ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Capability to use dynamic sql within iterates
Date Fri, 05 May 2006 14:16:55 GMT
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 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
solution and they will form the basis of the fix.  Thanks Christian!

Jeff Butler


On 5/5/06, Poitras Christian <Christian.Poitras@ircm.qc.ca> 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 <isEqual> and <isNotEqual> tags work in this situation but
> other tags like <isNotNull> do not work.  Has anybody got the <isNotNull>
> 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*<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 the
> iterated object.  See*** "myListOfGooObjects[].id"* the below sql.
>
>         <select id="testIterate" resultClass="java.util.HashMap"
> parameterClass="Foo">
>                 select *
>                 from foo
>                 WHERE
>                 <iterate property="myListOfGooObjects" conjunction="AND" >
>                          EXISTS ( SELECT 1
>                                           FROM bla
>                                           WHERE bla.type = 'X'
>                                                 <isNotNull* property=
> "myListOfGooObjects[].id"*>
>                                                 and ( id =
> #myListOfGooObjects[].id#  )
>                                                 </isNotNull>
>                                         )
>                 </iterate>
>         </select>
>
> 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 <idNotNull> 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 for
> 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 not
> 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 and
> consider obtaining relevant independent advice.
>

Mime
View raw message