Is there a simple way to recursively hydrate all related objects when performing a query?
Let's say I have the following tables:
Song
Composer
Century
When I do a SongPeer::doSelectJoinAll()
only the related composers are hydrated, so if I then do something like $song->getComposer()->getCentury()
, a new query will be performed.
I want to perform only one query to the DB so when I call $song->getComposer()->getCentury()
within a loop on all my songs objects, it doesn't end up in n additional queries.
Hope I'm clear :)
Thanks