Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 91503 invoked from network); 12 Apr 2006 12:47:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Apr 2006 12:47:55 -0000 Received: (qmail 19643 invoked by uid 500); 12 Apr 2006 12:47:53 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 19622 invoked by uid 500); 12 Apr 2006 12:47:52 -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 19609 invoked by uid 99); 12 Apr 2006 12:47:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Apr 2006 05:47:52 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [163.191.240.2] (HELO mail.idpa.state.il.us) (163.191.240.2) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Apr 2006 05:47:50 -0700 Received: from DPA2200B-MTA by mail.idpa.state.il.us with Novell_GroupWise; Wed, 12 Apr 2006 07:47:23 -0500 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.4 Date: Wed, 12 Apr 2006 07:47:10 -0500 From: "Erica Cody" To: Subject: Re: Help!! Problems with Nested GroupBy Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Okay - I got a copy of the most recent code yesterday from Jeff, but that = did not resolve the problem. I am still not getting back the employees on = the nested groupBy. =20 I can see I am getting the correct number of rows for the join, but the = mapping appears to populate an employee list (e.g. role) for the business = class before it actually maps the role. What I am getting back is 4 = Business classes with empty employee lists. Then where it puts the role, = I don't know because I can't seem to find it anywhere!! =20 Has anybody else dealt with this problem? Thanks E Erica, Start by using the version of iBATIS in SVN... there is a known bug in = 2.1.7 and before when nesting groupBy's. Regards, Sven >----- Oorspronkelijk bericht ----- >Van: Erica Cody [mailto:AID9C23@idpa.state.il.us]=20 >Verzonden: vrijdag, april 7, 2006 02:25 PM >Aan: user-java@ibatis.apache.org=20 >Onderwerp: Problems with groupBy > Help!! I am having problems getting my groupBy to work. My query brings = back 5 rows, but the businessEmployeesList collection is not populated for = any of the business objects. Here is my mapping: =20 .................... <-- all properties for = this table .................... <-- all properties = for this table I am using ArrayList list =3D (ArrayList)getSqlMapExecutor().queryForList("= getBusEmpRoleByIdNum", idNumber.trim()); to get the data When I debug this, it appears the businessEmployeesList collection is = null, which would seem to make sense since it appears from the debug = statements that the role is being built after the list is populated (I = have debug statements in the constructors). Where are the Role records = going? I can see they are being built, but the List I get back only seems = to have the 5 business objects! I have tried removing the groupBy on the = businessResult map, adding it to the busEmpRoleResult map and every = combination of the two, but no approach seems to work. Does anybody have = any suggestions? Thanks!! =20 [4/7/06 6:50:38:125 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Business - Building Business [4/7/06 6:50:38:125 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Business - Adding new business list with = null employees for common.model.Business@a890 [4/7/06 6:50:38:141 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Role - Building Role [4/7/06 6:50:38:141 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Business - Building Business [4/7/06 6:50:38:141 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Business - Adding new business list with = null employees for common.model.Business@a890 [4/7/06 6:50:38:141 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Role - Building Role [4/7/06 6:50:38:141 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Business - Building Business [4/7/06 6:50:38:141 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Business - Adding new business list with = null employees for common.model.Business@a890 [4/7/06 6:50:38:156 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Role - Building Role [4/7/06 6:50:38:156 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Business - Building Business [4/7/06 6:50:38:156 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Business - Adding new business list with = null employees for common.model.Business@a890 [4/7/06 6:50:38:156 CDT] 792fe35e SystemOut O * Servlet.Engine.Transpo= rts : 0 * * DEBUG common.model.Role - Building Role