You have to
 - create a criteria object
 - join the table you want
 - use YourFirstTablePeer::addSelectColumns($c) and
YourSecondTablePeer::addSelectColumns($c)
 - $rs = YourFirstTablePeer::doSelectRs($c)
 - hydrate your objects :
 while($rs->next())
 {
 $firstObject = new ....
 $pos = $firstObject->hydrate($rs);

$secondObject = new ...
$secondObject->hydrate($rs, $pos)

$firstObject->add($secondObject)
}

you may want to handle a pool of objects with an array if the same
$firstObject appears several times.

Thomas
On Mon, Jun 23, 2008 at 12:11 PM, Manoj Ghimire <[EMAIL PROTECTED]> wrote:
>
> One of my tables has about 10 foreign keys.
>
> Now I need Propel to select the table values joining and hydrating
> with respect to 2 foreign keys. I know for 1 key I can be done with
> doSelectJoinXXX, but what if I want to join 2 tables ?? I can't even
> use doSelectJoinAllExceptXXX cause that would try to hydrate about 9
> objects which I don't want.
>
> Please help...
>
>
> Manoj Ghimire
> >
>



-- 
Thomas Rabaix
Internet Consultant

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to