Return-Path: Delivered-To: apmail-incubator-ibatis-user-java-archive@www.apache.org Received: (qmail 96063 invoked from network); 24 Apr 2005 19:50:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Apr 2005 19:50:06 -0000 Received: (qmail 77949 invoked by uid 500); 24 Apr 2005 19:50:33 -0000 Delivered-To: apmail-incubator-ibatis-user-java-archive@incubator.apache.org Received: (qmail 77927 invoked by uid 500); 24 Apr 2005 19:50:32 -0000 Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Precedence: bulk Reply-To: ibatis-user-java@incubator.apache.org List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 77903 invoked by uid 99); 24 Apr 2005 19:50:32 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=RCVD_BY_IP,TO_ADDRESS_EQ_REAL X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of clinton.begin@gmail.com designates 64.233.184.202 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.202) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 24 Apr 2005 12:50:32 -0700 Received: by wproxy.gmail.com with SMTP id 69so1087295wra for ; Sun, 24 Apr 2005 12:50:03 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=b+Mu0qOn9cBfxRC41b8tNpv+oFHCywqObBqgNg21Fypy07b2w0GMGckq7IUxR+5xaXjcCEbjKZa4t1TuA3YZC5lvxrEwV9i0rDT9pNVEeosDGzCBE/D4o+pNgwgXPEAkWvOw32+mCB24HM7P12b33fxOv6npgOZy0dzgf5aWH3M= Received: by 10.54.15.76 with SMTP id 76mr1553552wro; Sun, 24 Apr 2005 12:50:02 -0700 (PDT) Received: by 10.54.93.19 with HTTP; Sun, 24 Apr 2005 12:50:02 -0700 (PDT) Message-ID: <16178eb105042412501200fdc5@mail.gmail.com> Date: Sun, 24 Apr 2005 13:50:02 -0600 From: Clinton Begin Reply-To: cbegin@ibatis.com To: "ibatis-user-java@incubator.apache.org" Subject: Re: Populating 2 lists within a class In-Reply-To: <426BDBC5.6030505@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <426BDBC5.6030505@gmail.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Eric, Please email all questions to the mailing list. This is a severe limitation of both the JDBC/ODBC bridge driver, ODBC in general and MS Access in general. All three suck big time. My first recommendation is to get a real database. There are plenty of high quality, free databases to choose from. There's no reason to use MS Access, unless there's a business driver constraining you. If you are constrained by some hard requirement to use MS Access, then I'm afraid you're out of luck. There are 2 key limitations that will keep you from being successful with your intention: 1) MS Access can only have a single result set open at a time.=20 Therefore, your nested SELECT statement will fail. This is also why the join mapping (N+1) works -- it's a single result set. 2) Columns must be read in the order that they're specified in the statement. For this reason you must avoid SELECT * and also avoid interrupting the serial reading of all columns (including running an intermediate select statement). Other than that, you have all of the usual threading problems associated with MS Access and the JDBC/ODBC bridge driver. In any case, best of luck in finding a solution. Clinton On 4/24/05, Eric T. Blue wrote: > Hi Clinton, >=20 > First of all I wanted to say that you guys have done a fantastic job on I= batis. I'm emailing a little late on this thread, > but I've actually run into a similar issue to this that I've been trying = to track down for about 3 days! I'm using MS Access > and am trying to populate a list for a 1:n relationship with a select sta= tement. >=20 > > > > > > >=20 > ... >=20 > Error: >=20 > --- Check the result mapping for the 'articles' property. > --- Cause: java.sql.SQLException: No data found > Caused by: java.sql.SQLException: No data found >=20 > Sure enough, after finding this thread I swapped the order of "articles" = and "id" and I get an exception on the "id" column. > If I comment out id, the getArticlesbyCategory will run just fine. What = is the resolution to this, and is it something > specific with MS Access and the JdbcOdbc driver? >=20 > I've experimented and can populate this by doing the n+1 workaround solut= ion. But I would still prefer to use the select > method in some circumstances. Thanks! >=20 > Re: Populating 2 lists within a class >=20 > Clinton Begin > Wed, 02 Mar 2005 15:35:29 -0800 >=20 > Uh oh. Would you by chance be using Microsoft Access or perhaps MS SQL S= erver? >=20 > Cheers, > Clinton >=20 > On Wed, 2 Mar 2005 15:02:50 -0800, Warren Bell > <[EMAIL PROTECTED]> wrote: > > I have a class that has two Lists as properties. I can populate one or = the > > other List, but I can not seem to get both of them populated. I have > > switched the order of the List mappings and it always has a problem wit= h the > > last one listed. The two lists are itemMovement and itemPromoPrices1 in= the > > result map "get-Item-Result1". I am getting a java.sql.SQLException: No= data > > found Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:. = Any > > help will be appreciated. > > > > > > > > > > > > > > > > > > > > > > > > > > > select=3D"getItemMovement1"/> > > > select=3D"getItemPromoPrice1"/> > > > > > > > > > > > > > > > > > > > > > nullValue=3D"-999"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks, > > > > Warren Bell > > Systems Administrator > > Clark's Nutritional Centers > > 4225 Market St. > > Riverside, CA 92501 > > 951-321-1960 ext. 142 > > 909-645-8864 mobile > > > > >=20 >