Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 93194 invoked from network); 1 Dec 2003 22:50:39 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Dec 2003 22:50:39 -0000 Received: (qmail 31407 invoked by uid 500); 1 Dec 2003 22:50:23 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 31392 invoked by uid 500); 1 Dec 2003 22:50:23 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 31378 invoked from network); 1 Dec 2003 22:50:23 -0000 Received: from unknown (HELO s5.supplehost.com) (64.90.182.98) by daedalus.apache.org with SMTP; 1 Dec 2003 22:50:23 -0000 Received: from joshholtzman.com (h-66-166-73-37.SNVACAID.covad.net [66.166.73.37]) by s5.supplehost.com (8.12.10/8.12.9) with ESMTP id hB1MoSBv011170 for ; Mon, 1 Dec 2003 17:50:28 -0500 Message-ID: <3FCBC5AB.6090503@joshholtzman.com> Date: Mon, 01 Dec 2003 14:50:19 -0800 From: Josh Holtzman User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4.1) Gecko/20031008 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Apache Torque Users List Subject: Re: Another question on foreign key getters and performance References: <3FCB8DAE.2050504@joshholtzman.com> <3FCBBBC4.3010806@backstagetech.com.au> In-Reply-To: <3FCBBBC4.3010806@backstagetech.com.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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? >> >> >> >> 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