Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 91936 invoked from network); 3 Jul 2006 22:22:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Jul 2006 22:22:01 -0000 Received: (qmail 3376 invoked by uid 500); 3 Jul 2006 22:21:59 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 3356 invoked by uid 500); 3 Jul 2006 22:21:59 -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 3344 invoked by uid 99); 3 Jul 2006 22:21:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jul 2006 15:21:59 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= 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; Mon, 03 Jul 2006 15:21:58 -0700 Received: from i-global254.qualcomm.com ([199.106.103.254] helo=RICK2) by waseda.lunarpages.com with esmtp (Exim 4.52) id 1FxWoG-00051I-Jx; Mon, 03 Jul 2006 15:22:28 -0700 From: "Rick" To: , Subject: RE: Employee self-join one to many relationship (iBatis) Date: Mon, 3 Jul 2006 15:21:35 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 In-Reply-To: Thread-Index: Acae7s1GhFhMljonQuOO8TP3/5rrmwAACW+w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 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 - [47 12] / [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: <20060703222158.E760D10FB016@asf.osuosl.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Bingo! Yep. Employee has a directReports list which is a list of Employees. -----Original Message----- From: Larry Meadors [mailto:lmeadors@apache.org] Sent: Monday, July 03, 2006 3:19 PM To: user-java@ibatis.apache.org Subject: Re: Employee self-join one to many relationship (iBatis) Hey Rick, I am not 100% sure I understand what you are trying to do, but let me try to restate it and see.. Do you want a list of employees, each one with another list of employees (direct reports), and a list of contacts on each one - both the main employee list and the child employees? Larry On 7/3/06, Rick wrote: > > > > > I just want to use iBatis in the cleanest way possible. I have a workaround > but wonder if iBatis support self-joined one to many relationships. > > > > Let me explain.. > > > > > > I have a query that returns employees. > > > > Employees have Boss's who are Employees. > > > > Currently I have Employees have Contacts who have Phone Numbers. > > > > (Where Employee, Contact and Phone number are objects.) > > > > I'd like to have Employees have Employees (directReports) and Employees have > Contacts who have Phone Numbers. > > > > Does iBatis support a self join? > > > > > > Here is my current mapping and how I get around this lack of support (or is > this support lacking)... > > > > , i.e., > > > > class="qcom.cas.mysourcej.poc.model.Employee" > groupBy="emplid"> > > > > > > > > > > > > > > class="qcom.cas.mysourcej.poc.model.Contact"> > > > > > > typeHandler="qcom.cas.commons.ibatis.typehandler.StringBooleanTypeHandler" > /> > > > > > > > > > > > > > > > > > > > > > > > > > > > >