ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janet Li <lil_foo...@yahoo.com>
Subject nested iteration
Date Thu, 20 Apr 2006 15:52:17 GMT
I have a statement like this:
  <statement id="getAttributesFiltered" parameterClass="java.util.Map" resultMap="get_attributes_values">
  <iterate property="idList" conjunction = "union"> 
  select NVL(attr_display_value, attr_value) AS LABEL, attr_value as VALUE FROM
  $idList[].partition$ t
  WHERE zeid = #idList[].zeId# and attr_display_order = #attributeColOrder# AND
  <iterate property="attrList" conjunction = "AND">
  (select RESULTSET_ID
  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 execution.  
--- 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 and save big.
View raw message