ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MCCORMICK, Paul" <Paul.McCORM...@doir.wa.gov.au>
Subject Capability to use dynamic sql within iterates
Date Fri, 05 May 2006 03:22:55 GMT

I have read Issue 148 and it looks like I can use dynamic sql within an
iterate tag

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"
		select *
		from foo
		<iterate property="myListOfGooObjects" conjunction="AND"
			 		  FROM bla
			 		  WHERE bla.type = 'X'
		 		  		and ( id =
#myListOfGooObjects[].id#  )

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
View raw message