ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Poitras Christian" <Christian.Poit...@ircm.qc.ca>
Subject RE: nested iteration
Date Thu, 20 Apr 2006 21:27:04 GMT
I created an issue about this problem.
See http://issues.apache.org/jira/browse/IBATIS-281
If this is also a problem for you, please vote for it.
The patch is in the issue. If you can't apply the patch yourself (or if
you don't known how to apply it correctly), I can create a jar file for
you including the patch. I made it only for version 2.1.7, but I believe
I can correct any 2.1 versions or higher with the same code. If you want
me to correct a specific version, please tell me which one you want and
I will send a jar to you.
Christian Poitras


From: Janet Li [mailto:lil_foobar@yahoo.com] 
Sent: Thursday, 20 April 2006 11:52
To: user-java@ibatis.apache.org
Subject: nested iteration

I have a statement like this:
<statement id="getAttributesFiltered" parameterClass="java.util.Map"
<iterate property="idList" conjunction = "union"> 
select NVL(attr_display_value, attr_value) AS LABEL, attr_value as VALUE
$idList[].partition$ t
WHERE zeid = #idList[].zeId# and attr_display_order =
#attributeColOrder# AND
<iterate property="attrList" conjunction = "AND">
from $idList[].partition$
where zeid = #idList[].zeId#
AND ATTR_VALUE = #attrList[].attrValue#
AND ATTR_DISPLAY_ORDER = #attrList[].attrDisplayOrder#)
I am getting an error :
Cause: com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred while preparing the mapped statement for
--- Check the getAttributesFiltered.  
--- Check the parameter map.  
--- 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: ""

I believe it's because it cannot read the $idList[].partition$ value
inside the nested interate tag.  Does anyone know how to solve this
problem?  I need the table name value from the outer tag to be readable
in the inner iterate tag.


New Yahoo! Messenger with Voice. Call regular phones from your PC
m/evt=39666/*http://beta.messenger.yahoo.com>  and save big.

View raw message