db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: Joins to read corresponding rows
Date Sun, 10 Feb 2008 14:22:17 GMT
Martin Tilsted wrote:
> Now according to the documentation, I would expect BaseLocalepagePeer to 
> have a protected method called doSelectJoinLocalePagepart but it don't.
> It does not have any method starting with doSelectJoin.
> But my BaseLocalepagepartPeer do have a doSelectJoinLocalepage.

The doSelectJoin* methods exist only for the N side of a 1:N relation. 
However you can easily use doSelectJoinLocalPage() to achieve what you want.

The result of the join is basically the same: A record of Localepagepart 
together with their Localepage in each line. Only that the Localepages 
are repeated. The magic inside the doselectJoin* methods detects if the 
Localepage objects are identical (by comparing their primary keys) and 
avoids to duplicate them. So the only thing you need to do after the 
doSelectJoinLocalepage() call is to loop through the result set and to 
select the different Localepages which will be prepopulated with their 
associated Localepagepart objects.

Bye, Thomas.

To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message