Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 87847 invoked from network); 1 Jul 2005 21:50:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Jul 2005 21:50:04 -0000 Received: (qmail 61894 invoked by uid 500); 1 Jul 2005 21:50:02 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 61860 invoked by uid 500); 1 Jul 2005 21:50:01 -0000 Mailing-List: contact dev-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ibatis.apache.org Delivered-To: mailing list dev@ibatis.apache.org Received: (qmail 61837 invoked by uid 500); 1 Jul 2005 21:50:01 -0000 Delivered-To: apmail-incubator-ibatis-dev@incubator.apache.org Received: (qmail 61832 invoked by uid 99); 1 Jul 2005 21:50:00 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jul 2005 14:50:00 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 9D5A613 for ; Fri, 1 Jul 2005 23:49:57 +0200 (CEST) Message-ID: <746509771.1120254597643.JavaMail.jira@ajax.apache.org> Date: Fri, 1 Jul 2005 23:49:57 +0200 (CEST) From: "Manfred Klug (JIRA)" To: ibatis-dev@incubator.apache.org Subject: [jira] Commented: (IBATIS-148) Capability to use dynamic sql within iterates In-Reply-To: <57055734.1118161662662.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/IBATIS-148?page=comments#action_12314920 ] Manfred Klug commented on IBATIS-148: ------------------------------------- Brandon, a small variation of your test reveals the problem. the java code: public void testIterateNestedListPropertyC() throws SQLException { Account account = new Account(); account.setFirstName("Clinton"); Account newAccount = new Account(); newAccount.setLastName ("Jones"); account.setAccountList(new ArrayList()); account.getAccountList().add(newAccount); List list = sqlMap.queryForList("iterateNestedListPropertyC", account); // assertAccount1((Account) list.get(0)); // assertEquals(3, list.size()); } the mapped statement code: the final sql statement is: select ACC_ID as id, ACC_FIRST_NAME as firstName, ACC_LAST_NAME as lastName, ACC_EMAIL as emailAddress from ACCOUNT WHERE ACC_LAST_NAME = ? OR ACC_FIRST_NAME = ? the passed in parameters are: [0] = Clinton [1] = Jones and this is the problem. The correct parameters should be: [0] = Jones [1] = Clinton > Capability to use dynamic sql within iterates > --------------------------------------------- > > Key: IBATIS-148 > URL: http://issues.apache.org/jira/browse/IBATIS-148 > Project: iBatis for Java > Type: Improvement > Components: SQL Maps > Versions: 2.0.9b, 2.1.0 > Reporter: Sam Abeyratne > Assignee: Brandon Goodin > > I am getting the following error when I try to run a simple query that has a dynamic within an iterate tag. Per Brandon, this is a known issue that needs to be fixed. > Thanks! > Sam > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - Parameters: {sidList=[abc1, abc2], carrier=ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - Calling queryForList with statementName: queryInterfaceErrorCount and parameters: {sidList=[abc1, abc2], carrier= ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,294 [HttpRequestHandler-2083] ERROR xxxDispatchAction.class - Entered catch block in viewErrorLog: Exception in queryInterfaceErrorCount: 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: "" > The sqlmap looks something like: > > > Java bean looks like: > public class InterfaceErrorCount { > private int count; > public int getCount() { > return count; > } > public void setCount(int count) { > this.count = count; > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira