Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 4227 invoked from network); 30 Jan 2008 19:34:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jan 2008 19:34:46 -0000 Received: (qmail 25997 invoked by uid 500); 30 Jan 2008 19:34:32 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 25984 invoked by uid 500); 30 Jan 2008 19:34:32 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 25895 invoked by uid 99); 30 Jan 2008 19:34:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2008 11:34:31 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hh4ross@gmail.com designates 64.233.184.229 as permitted sender) Received: from [64.233.184.229] (HELO wr-out-0506.google.com) (64.233.184.229) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2008 19:34:03 +0000 Received: by wr-out-0506.google.com with SMTP id c30so311263wra.24 for ; Wed, 30 Jan 2008 11:34:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=uJH42uwsm494rLlpURIQWju1f0zun0qkNLU4mkbX4MY=; b=fGh6bZmpbQRPeRunFksI+hwsF9iVIuUg+F5D+F1FuC7DnWxqSfgWDyLDUddccMktttpOoqVIrPikE43/2+OS2Izc3bBnBX02exadioc3N69ucWzVkx113XlKQv6zgmdzL31dHBvmQSPnRrEwf40Z7hDmLPCqlytgSNXd1zZabak= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=UhyzICEXp2Bq4IedzlUXQSCL8S8bOu27ipLYt6mbDKoWjPL8NayZbjUcKDFusSfU+T3+zA7teNudX7qUWqQkIMZjLlIKFDEEK2k1CVVTtT++igNqfvFOwfPXc/Q+eM0/4GTwkJuP2zdzuvCYtZZ1rHqUS5oGT/lRZKOTtE4oX+E= Received: by 10.142.154.20 with SMTP id b20mr602356wfe.172.1201721648091; Wed, 30 Jan 2008 11:34:08 -0800 (PST) Received: by 10.142.178.18 with HTTP; Wed, 30 Jan 2008 11:34:08 -0800 (PST) Message-ID: Date: Wed, 30 Jan 2008 14:34:08 -0500 From: "Hugh Ross" To: user-java@ibatis.apache.org Subject: Re: deep (and wide) inheritance model In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_22096_3053722.1201721648048" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_22096_3053722.1201721648048 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I have associations at various levels of the hierarchy. Some of which are "many." I'm trying to avoid having one huge join for all the possible sub-classes. Yes, a bunch of smaller queries would be preferred. (Assuming they don't repeat/overlap each other a lot.) On 1/30/08, Christopher Lamey wrote: > > So are you basically looking at one big query with a bunch of joined > tables > or a bunch of smaller queries to pull it all together? > > If so, which one would fit better for your app? > > On 1/29/08 6:42 PM, "Hugh Ross" wrote: > > > I have the good fortune to work on a large domain model, part of which > uses > > too much inheritance. I don't want to use a huge outer join with 15 or > 20 > > tables in it. I'm wondering if I can use RowHandlers to help. In > > particular, is it possible for a RowHandler to replace the object passed > to > > the handleRow method? > > > > E.g., > > ** > > *public void handleRow (Object valueObject) > > throws SQLException { > > Person person = (Person) valueObject; > > valueObject = MyFactory.createSubClassObject( person );* > > *} > > * > > Any other sample solutions to this kind of problem are also most > welcome... > > * > > * > > ------=_Part_22096_3053722.1201721648048 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
 
I have associations at various levels of the hierarchy.  Some of which are "many."  I'm trying to avoid having one huge join for all the possible sub-classes.  Yes, a bunch of smaller queries would be preferred.  (Assuming they don't repeat/overlap each other a lot.)

 
On 1/30/08, Christopher Lamey <clamey@localmatters.com> wrote:
So are you basically looking at one big query with a bunch of joined tables
or a bunch of smaller queries to pull it all together?

If so, which one would fit better for your app?

On 1/29/08 6:42 PM, "Hugh Ross" <hh4ross@gmail.com> wrote:

> I have the good fortune to work on a large domain model, part of which uses
> too much inheritance.  I don't want to use a huge outer join with 15 or 20
> tables in it.  I'm wondering if I can use RowHandlers to help.  In
> particular, is it possible for a RowHandler to replace the object passed to
> the handleRow method?
>
> E.g.,
> **
> *public void handleRow (Object valueObject)
>    throws SQLException {
>    Person person = (Person) valueObject;
>    valueObject = MyFactory.createSubClassObject( person );*
> *}
> *
> Any other sample solutions to this kind of problem are also most welcome...
> *
> *


------=_Part_22096_3053722.1201721648048--