Changeset 4817

Show
Ignore:
Timestamp:
08/26/08 21:24:20 (10 months ago)
Author:
jwage
Message:

docs

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/docs/manual/en/working-with-objects.txt

    r4674 r4817  
    11++ Dealing with relations 
     2 
    23++ Many-to-Many relations 
     4 
     5Note: Doctrine requires that Many-to-Many relationships be bi-directional. For example: both User must have many Group and Group must have many User. This is required by Doctrine in order for Many-to-Many relationships to fully work. 
     6 
    37+++ Creating a new link 
    4 Lets say we have two classes User and Group which are linked trhough a GroupUser association class. When working with  
    5 transient (new) records the fastest way for adding a User and couple of Groups for it is: 
     8 
     9Lets say we have two classes User and Group which are linked through a GroupUser association class. When working with transient (new) records the fastest way for adding a User and couple of Groups for it is: 
     10 
    611<code type="php"> 
    712$user = new User(); 
     
    1217</code> 
    1318 
    14 However in real world scenarious you often already have existing groups, where you want to add a given user. The most  
    15 efficient way of doing this is: 
     19However in real world scenarios you often already have existing groups, where you want to add a given user. The most efficient way of doing this is: 
     20 
    1621<code type="php"> 
    1722$gu = new GroupUser();