Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 93740 invoked from network); 20 Apr 2006 15:52:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Apr 2006 15:52:53 -0000 Received: (qmail 1511 invoked by uid 500); 20 Apr 2006 15:52:44 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 1493 invoked by uid 500); 20 Apr 2006 15:52:43 -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 1468 invoked by uid 99); 20 Apr 2006 15:52:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Apr 2006 08:52:42 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [206.190.38.160] (HELO web53911.mail.yahoo.com) (206.190.38.160) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 20 Apr 2006 08:52:42 -0700 Received: (qmail 65130 invoked by uid 60001); 20 Apr 2006 15:52:17 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=YvMdk3RHA6U4wKDdVzlfzUfCYQelHuu03QDvQ/FS3AGd+JqF1CgChIJ9VEtz1nYkYnzNKkZfwA4a/Kj+Zr/H0vBgEdF2BMv/ATl1mYjsPjOAhFHYorXKMH2Loxwmz9sJAYh44I5BVGU+Rm/a6I2l1oQrajt/FhcsJMiuJ635ZZc= ; Message-ID: <20060420155217.65128.qmail@web53911.mail.yahoo.com> Received: from [216.232.47.142] by web53911.mail.yahoo.com via HTTP; Thu, 20 Apr 2006 08:52:17 PDT Date: Thu, 20 Apr 2006 08:52:17 -0700 (PDT) From: Janet Li Subject: nested iteration To: user-java@ibatis.apache.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1582955222-1145548337=:65113" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-1582955222-1145548337=:65113 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit I have a statement like this: 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 t.RESULTSET_ID in (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. --0-1582955222-1145548337=:65113 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
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">
t.RESULTSET_ID in
(select RESULTSET_ID
from $idList[].partition$
where zeid = #idList[].zeId#
AND ATTR_VALUE = #attrList[].attrValue#
AND ATTR_DISPLAY_ORDER = #attrList[].attrDisplayOrder#)
</iterate>
</iterate>
</statement>
 
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. --0-1582955222-1145548337=:65113--