Changeset 4577

Show
Ignore:
Timestamp:
06/28/08 05:19:04 (6 months ago)
Author:
jwage
Message:

Moving Working with Objects to an earlier chapter.

Location:
branches/0.11/manual/docs
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/0.11/manual/docs/en.txt

    r4159 r4577  
    44+ Relations 
    55+ Schema Files 
    6 + Utilities 
    76+ Working with objects 
    87+ Component overview 
     
    1110+ Data fixtures 
    1211+ DQL (Doctrine Query Language) 
     12+ Utilities 
    1313+ Native SQL 
    1414+ Transactions 
  • branches/0.11/manual/docs/en/working-with-objects.txt

    r4552 r4577  
    235235</code> 
    236236 
     237Retrieve Users and the Groups they belong to 
     238 
     239<code type="php"> 
     240$q = Doctrine_Query::create() 
     241        ->from('User u') 
     242        ->leftJoin('u.Groups g'); 
     243$users = $q->fetchArray(); 
     244 
     245foreach ($users[0]['Groups'] as $group) { 
     246    echo $group['name']; 
     247} 
     248</code> 
     249 
    237250Simple WHERE with one parameter value 
    238251