db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Vandahl ...@apache.org>
Subject Re: AW: Joins and performance
Date Fri, 01 Jun 2007 16:26:00 GMT
Vitzethum, Daniel wrote:
> Using that feature, you cannot use the Peer.doSelect() method, but have
> to use Peer.doSelectVillageRecords(), which will return all columns of
> all joined tables in a village Record object, with no big difference to
> plain JDBC in handling. If you need or want Torque data objects, you
> have to extract them one by one from the result set.

If you switch complexObjectModel to true in your generator properties,
Torque will generate protected methods e.g. doSelectJoinBuildings() in
the BaseSomethingPeer classes. You can make those visible by overriding
them in your PeerSomething class. These methods will do the join for you
and pre-populate the collections and referenced objects. No need to deal
with Village records.

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