http://propel.phpdb.org/trac/wiki/Users/Documentation/1.2/ManyToManyRelationships
<pre>
<?php
$books = BookPeer::doSelect(new Criteria());
// for every book get all readers
foreach($books as $book) {
$readerRefs = $book->getBookReaderRefsJoinReader();
foreach($readerRefs as $ref) {
$reader = $ref->getReader(); // <-- this isn't an additional query
// since we used the Join method
above
}
}
</pre>
getBookReaderRefsJoinReader is defined as a method in the
BookReaderRefs so how does the Book object have access to it?
Could somebody please clear up does symfony / propel automatically
generate methods for handling many-to-many relationships? If symfony
does not automatically generate methods for handling many-to-many
relationships is there a simple functioning complete working example.
ie something like what the above snippet attempts to do with books
have many readers and readers has many books.
Assistance is appreciated
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---