Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 58710 invoked from network); 5 May 2006 14:17:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 May 2006 14:17:20 -0000 Received: (qmail 72401 invoked by uid 500); 5 May 2006 14:17:17 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 72382 invoked by uid 500); 5 May 2006 14:17:17 -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 72371 invoked by uid 99); 5 May 2006 14:17:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 May 2006 07:17:17 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_MESSAGE,HTML_TAG_EXIST_TBODY,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jeffgbutler@gmail.com designates 66.249.82.195 as permitted sender) Received: from [66.249.82.195] (HELO wx-out-0102.google.com) (66.249.82.195) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 May 2006 07:17:15 -0700 Received: by wx-out-0102.google.com with SMTP id s17so530775wxc for ; Fri, 05 May 2006 07:16:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=HwA3gN1jxGHGxxBSh/Uotrt4nXUk7M2X3gm99BBHE5ojtq0MB8RJ5K++eQjbib5pObpGVS8xxywKk9GGjNofCOaFgNuvY/ytzFogMcoHTzQNvy4DXglo7PbpcQN+23u0ZFk+egyA9fWo1bTMZ1vuuziSWsrNtlAV1v0bE1Wj7M0= Received: by 10.70.63.7 with SMTP id l7mr2483964wxa; Fri, 05 May 2006 07:16:55 -0700 (PDT) Received: by 10.70.69.17 with HTTP; Fri, 5 May 2006 07:16:55 -0700 (PDT) Message-ID: Date: Fri, 5 May 2006 09:16:55 -0500 From: "Jeff Butler" To: user-java@ibatis.apache.org Subject: Re: Capability to use dynamic sql within iterates In-Reply-To: <5820E7E2A928DB46824297946AC2024A9A5E06@pandore.ircm.priv> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_55033_4574915.1146838615019" References: <5820E7E2A928DB46824297946AC2024A9A5E06@pandore.ircm.priv> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_55033_4574915.1146838615019 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline IBATIS 131, 148, 281, and now 293 are all related to the same issue. I have an interest in this issue because of some things I'm trying to do with Abator, so I am working on a comprehensive fix. Please don't enter any mor= e JIRA's about this issue - we are well aware of the problem. I hope to have the problem resolved soon. BTW - the patches in IBATIS-281 are probably the most comprehensive solution and they will form the basis of the fix. Thanks Christian! Jeff Butler On 5/5/06, Poitras Christian wrote: > > You can download the last version of iBatis from CVS. The problem might > already be solved. > > If this doesn't work, take a look at issue 281. This may patch your > problem. > http://issues.apache.org/jira/browse/IBATIS-281 > > ------------------------------ > *From:* MCCORMICK, Paul [mailto:Paul.McCORMICK@doir.wa.gov.au] > *Sent:* Friday, 05 May 2006 00:07 > > *To:* user-java@ibatis.apache.org > *Subject:* RE: Capability to use dynamic sql within iterates > > > I did some further testing after reading issue 131 > http://issues.apache.org/jira/browse/IBATIS-131 > > I found that and tags work in this situation but > other tags like do not work. Has anybody got the > tag to work in the sistuation below? > > Thanks, > Paul > > ------------------------------ > *From:* MCCORMICK, Paul [mailto:Paul.McCORMICK@doir.wa.gov.au] > *Sent:* Friday, 5 May 2006 11:23 AM > *To:* user-java@ibatis.apache.org > *Subject:* Capability to use dynamic sql within iterates > > > > Hello > I have read Issue 148 and it looks like I can use dynamic sql within an > iterate tag > *http://issues.apache.org/jira/browse/IBATIS-148* > > I have a problem when I set the*** property* on a tag to be a value on th= e > iterated object. See*** "myListOfGooObjects[].id"* the below sql. > > > > Here is the parameter classes used, getters and setters ommited. > class Foo { > // Contains a list of Goo objects > List myListOfGooObjects; > } > > class Goo { > // This is the value that is want to the tag on. > Integer id; > } > > The error is get is: > --- Cause: com.ibatis.common.beans.ProbeException: Error getting ordinal > list from JavaBean. Cause java.lang.NumberFormatException: For input > string: "" > Caused by: java.lang.NumberFormatException: For input string: "" > "DISCLAIMER: This email, including any attachments, is intended only fo= r > use by the addressee(s) and may contain confidential and/or personal > information and may also be the subject of legal privilege. If you are no= t > the intended recipient, you must not disclose or use the information > contained in it. In this case, please let me know by return email, delete > the message permanently from your system and destroy any copies. > > Before you take any action based upon advice and/or information contained > in this email you should carefully consider the advice and information an= d > consider obtaining relevant independent advice. > ------=_Part_55033_4574915.1146838615019 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
IBATIS 131, 148, 281, and now 293 are all related to the same issue. I= have an interest in this issue because of some things I'm trying to do wit= h Abator, so I am working on a comprehensive fix.  Please don't enter = any more JIRA's about this issue - we are well aware of the problem.  = I hope to have the problem resolved soon.
 
BTW - the patches in IBATIS-281 are probably the most comprehensive so= lution and they will form the basis of the fix.  Thanks Christian= !
 
Jeff Butler

 
On 5/5/06, P= oitras Christian <Ch= ristian.Poitras@ircm.qc.ca> wrote:
You can download the last version of iBatis from CVS. The prob= lem might already be solved.
 
If this doesn't work, take a look at issue 281. This may = patch your problem.


From: MCCORMICK, Pau= l [mailto:Paul.McCORMICK@= doir.wa.gov.au ]
Sent: Friday, 05 May 2006 00:07
Subject: RE: Capability to use dynamic= sql within iterates

 
I did some further testing after reading issue 131 http://issues.apache.org/jira/browse/IBATIS-131
 
I found that <isEqual> and <isNotEqual> tags = work in this situation but other tags like <isNotNull> do not work.&n= bsp; Has anybody got the <isNotNull> tag to work in the sistuation be= low?
 
Thanks,
Paul


From: MCCORMICK, Paul [mailto:Paul.McCORMICK@doir.wa.gov.au]
Sent: Friday, 5 May 2006 11:23 AM
To:
user-java@ibatis.apache.org
Subject: Capability to use dynamic sql within iterates

 

Hello
I have read Issue 148 and it looks like I can use dynamic sql with= in an iterate tag
http://issues.apache.o= rg/jira/browse/IBATIS-148


I have a problem when I set the property on a tag to be a value on the iterated object.  See <= font face=3D"Courier New" color=3D"#2a00ff" size=3D"2">"myListOfGooObj= ects[].id" the below sql. <= /font>

        <select id =3D"tes= tIterate" resultClass=3D "java.util.HashMap" parameterClass=3D "Foo">
=              &n= bsp;  select *=
             &n= bsp;  from foo=
           &n= bsp;    WHERE  
       =         <iterate<= /font> property=3D "myListOfGooObjects" conjunction=3D"AND" >=
            &nb= sp;            EXISTS ( SELECT 1              &= nbsp;                        &= nbsp;   FROM bla
       =              &= nbsp;   &= nbsp;            &nb= sp;   WHERE bla.type =3D 'X' 
    =                           &= nbsp;              &= nbsp;  = <isNotNul= l propert= y =3D"myListOfGooObje= cts[].id"
>
            &nb= sp;                 = ;               = ;   and ( id =3D #myListOfGooObjects[].id#  )
&nb= sp;             = ;    = ;              =               &= nbsp; </isNotNull>
 = ;             &= nbsp;             =             )  =               &= nbsp;     
    &nbs= p;           </ iterate><= /font>
&= nbsp;       </ select>

Here is the parameter classes used, = ; getters and setters ommited.
c= lass Foo {
    //= Contains a list of Goo objects
    List myListO= fGooObjects; 
}

class Goo {
    // This is the value that is want to the = <idNotNull> tag on.
 =    Integer id;
}


The error is get is:
--- Cause: com.ibatis.common.beans.ProbeException: Error getti= ng ordinal list from JavaBean. Cause java.lang.NumberFormatException: For i= nput string: ""
Caused by: java.lang.NumberFormatException: For input string: "&qu= ot;

"DISCLAIMER: This emai= l, including any attachments, is intended only for use by the addressee(s) = and may contain confidential and/or personal information and may also be th= e subject of legal privilege. If you are not the intended recipient, you mu= st not disclose or use the information contained in it. In this case, pleas= e let me know by return email, delete the message permanently from your sys= tem and destroy any copies.=20

Before you take any action based upon advice and/or information con= tained in this email you should carefully consider the advice and informati= on and consider obtaining relevant independent advice.

------=_Part_55033_4574915.1146838615019--