Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 4857 invoked from network); 5 Jul 2006 21:49:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Jul 2006 21:49:20 -0000 Received: (qmail 36937 invoked by uid 500); 5 Jul 2006 21:49:17 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 36920 invoked by uid 500); 5 Jul 2006 21:49:16 -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 36909 invoked by uid 99); 5 Jul 2006 21:49:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jul 2006 14:49:16 -0700 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=HTML_MESSAGE,MAILTO_TO_SPAM_ADDR X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [216.193.202.245] (HELO waseda.lunarpages.com) (216.193.202.245) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Jul 2006 14:49:15 -0700 Received: from i-global254.qualcomm.com ([199.106.103.254] helo=RICK2) by waseda.lunarpages.com with esmtp (Exim 4.52) id 1FyFFl-0000gI-8D for user-java@ibatis.apache.org; Wed, 05 Jul 2006 14:49:49 -0700 From: "Rick" To: Subject: RE: No tree support in iBatis RE: It worked (kinda) RE: One solution to self-join, new feature request.... RE: Employee self-join one to many relationship (iBatis) Date: Wed, 5 Jul 2006 14:48:51 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00E2_01C6A042.228030F0" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: <295517f10607051355t7acfa4efl98030494dd1ba267@mail.gmail.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Thread-Index: AcagdZd/uV6I9wD1S+G0fFf/kCcuzwABy11A X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - waseda.lunarpages.com X-AntiAbuse: Original Domain - ibatis.apache.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - arc-mind.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Checked: Checked by ClamAV on apache.org Message-Id: <20060705214916.39C7D10FB003@asf.osuosl.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_00E2_01C6A042.228030F0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I'll take a look. _____ From: Eric T. Blue [mailto:ericblue76@gmail.com] Sent: Wednesday, July 05, 2006 1:56 PM To: user-java@ibatis.apache.org Subject: Re: No tree support in iBatis RE: It worked (kinda) RE: One solution to self-join, new feature request.... RE: Employee self-join one to many relationship (iBatis) Rick, For what it's worth, I also tried building a tree a while ago using a combo of SQL and abstracting some code in the DAO (No RowHandler or anything like that). Because some of these trees were going to be potentially very large (a couple hundred thousand items), and I was not using a cache-model I opted to do this in code. I basically execute a single query to return a List of objects, each containing an id and parent id property. Then I used the Jenkov TreeTag library ( http://java-source.net/open-source/jsp-tag-libraries/prize-tags) to iterate over the collection and build the tree. This is primarily used for building trees in JSP, but you can use the public API just fine. P.S. It looks like the jenkov.com site is down right now. But if you're interested in some sample code I'd be more than happy to mail off-list. On 7/5/06, Larry Meadors wrote: > It seems like dealing with trees is a fairly common case, so this could be > generalized and put into iBatis. IMO, I think you should add it so we have a reminder of it...even if we never implement it. I wonder if a RowHandler implementation would be faster. I guess if you are bored you could try that, too. ;-) Larry ------=_NextPart_000_00E2_01C6A042.228030F0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I’ll take a = look.

 


From: Eric = T. Blue [mailto:ericblue76@gmail.com]
Sent: Wednesday, July 05, = 2006 1:56 PM
To: = user-java@ibatis.apache.org
Subject: Re: No tree = support in iBatis RE: It worked (kinda) RE: One solution to self-join, new feature request.... RE: Employee self-join one to many relationship = (iBatis)

 

Rick,

For what it's worth, I also tried building a tree a while ago using a = combo of SQL and abstracting some code in the DAO (No RowHandler or anything like that).  Because some of these trees were going to be potentially = very large (a couple hundred thousand items), and I was not using a = cache-model I opted to do this in code.  I basically execute a single query to = return a List of objects, each containing an id and parent id property.  = Then I used the Jenkov TreeTag library ( = http://java-source.net/open-source/jsp-tag-libraries/prize-tags) = ; to iterate over the collection and build the tree.  This is = primarily used for building trees in JSP, but you can use the public API just = fine. 

P.S. It looks like the jenkov.com site = is down right now.  But if you're interested in some sample code I'd be = more than happy to mail off-list.

On 7/5/06, Larry Meadors <lmeadors@apache.org> wrote:

> It seems like dealing with trees is a fairly common case, = so this could be
> generalized and put into iBatis.

IMO, I think you should add it so we have a reminder of it...even if
we never implement it.

I wonder if a RowHandler implementation would be faster. I guess if
you are bored you could try that, too. ;-)

Larry

 

------=_NextPart_000_00E2_01C6A042.228030F0--