db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: Another question on foreign key getters and performance
Date Mon, 01 Dec 2003 22:08:04 GMT
Josh Holtzman wrote:

> I recently asked a question about the performance of calling torque 
> objects' foreign key getters, and I just read another question from a 
> lead developer trying to shield his team from using these getters (a 
> smart move, since these just kill performance).  My question is this:
> If you don't use these getters, what's the alternative?  I have a 
> torque object, and I need to get the collections belonging to this 
> object.  I need to do this many times per page (it's a webapp).  I 
> specify all of the joins [ with criteria.addJoin() ] when I get the 
> list of the top-level objects -- shouldn't that be enough to keep 
> torque from hammering on the database?
> <Throws down the gauntlet/>
> Can anyone provide a code example that gets collections of torque 
> objects through only one database call?

Have you looked at the protected doSelectJoin...() methods generated in 
the Base Peer classes?  You need to override these in the non-Base 
classes to make them available.


Scott Eade
Backstage Technologies Pty. Ltd.

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

View raw message