db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Holtzman <j...@joshholtzman.com>
Subject Re: Another question on foreign key getters and performance
Date Mon, 01 Dec 2003 22:50:19 GMT
Thanks Scott.  I made these methods public in my peer classes, but when 
I run them, they throw StackOverflowErrors.  Any ideas why this would 
be?  I'll take a look through the source & see if I can come up with a 
solution.

I wish there were a way to specify whether you want the objects to be 
fully instantiated (including all referenced objects and collections) 
when returned by a select -- that would be really nice.

Thanks,
Josh

Scott Eade wrote:

> 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
>


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


Mime
View raw message