Changes between Version 6 and Version 7 of Documentation/1.3/Relationships


Ignore:
Timestamp:
07.03.2008 03:40:55 (3 years ago)
Author:
hans
Comment:

Fixing documentation about joins for #589

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/1.3/Relationships

    v6 v7  
    9292  1. n x SELECT * FROM author WHERE author_id = ''$book->getAuthorId()'' 
    9393 
    94 While clearly this method works, it is not optimal to execute that second query for each iteration. Propel also generates methods in your base peer class to fetch both book and author information in a single query.  
     94While clearly this method works, it is not optimal to execute that second query for each iteration. Propel also generates methods in your base peer class to fetch both book and author information in a single query using a left join^*^.  
    9595 
    9696{{{ 
     
    106106In the above case only a single query is performed: 
    107107 
    108   1. SELECT * FROM book INNER JOIN author ON author.author_id = book.author_id 
     108  1. SELECT * FROM book LEFT JOIN author ON author.author_id = book.author_id 
    109109 
    110110Continue reading the [wiki:Documentation/1.3/ManyToManyRelationships Many-to-Many Relationships] page for a treatment of this more-advanced realtionship topic. 
     111 
     112^*^ Note that in Propel 1.3 the behavior changed from performing INNER JOIN to using LEFT JOIN by default.  Please see wiki:Documentation/1.3/Upgrading for more information and instructions on how to keep the original INNER JOIN behavior if your application depends on this. 
    111113 
    112114== Using Relationships in Criteria ==