Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 72577 invoked from network); 14 Mar 2007 19:59:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2007 19:59:34 -0000 Received: (qmail 54593 invoked by uid 500); 14 Mar 2007 19:59:40 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 54568 invoked by uid 500); 14 Mar 2007 19:59:40 -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 54556 invoked by uid 99); 14 Mar 2007 19:59:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 12:59:40 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 12:59:29 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8633471407D for ; Wed, 14 Mar 2007 12:59:09 -0700 (PDT) Message-ID: <5309369.1173902349547.JavaMail.jira@brutus> Date: Wed, 14 Mar 2007 12:59:09 -0700 (PDT) From: "Craig Swift (JIRA)" To: dev@ibatis.apache.org Subject: [jira] Created: (IBATIS-407) Recursive queries fail MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Recursive queries fail ---------------------- Key: IBATIS-407 URL: https://issues.apache.org/jira/browse/IBATIS-407 Project: iBatis for Java Issue Type: Bug Affects Versions: 2.3.0 Environment: Solaris 9, Oracle 10, Java, Spring/Struts Reporter: Craig Swift Hello, I wanted to report a potential bug in the latest release of IBATIS. This issue only appeared after performing a recent upgrade to the latest jar, i.e. everything used to work. :) I'll do my best to try and explain it over email - although it's a little confusing. I have the two following tables (simplified): RC_AWARD: ID NUMBER(10) NAME VARCHAR2(50) Primary Key: ID RC_AWARD_DEPENDENCIES: DEPENDENT_AWARD_ID NUMBER(10) DEPENDENCY_AWARD_ID NUMBER(10) Primary Key: DEPENDENT_AWARD_ID, DEPENDENCY_AWARD_ID There are six rows in the RC_AWARD table, and five rows in the RC_AWARD_DEPENDENCIES table, with basically one award be dependent on the other 5. ------------------------------------ My SQL Map looks like the following: ------------------------------------ Finally the Award class is a simple bean where id and name are strings and dependencies is a List. ------------------------------------ Ok, so there's the setup. ;) What used to happen is when I would call "getAward" I'd get a single award object with my five award dependencies populated in the object. public Award getAward(String id) { return awardDao.getAward(id);; } Now for what ever reason I only get the first dependency and not the other four. If I run the queries seperately, something similar to this: public Award getAward(String id) { Award award = awardDao.getAward(id); award.setDependencies(awardDao.getDependentAwards(id)); return award; } Everything is fine again. If it helps we went from version 2 (I think, about 1 & 1/2 years old) to 2.3. This small tool is supposed to be our "test" project before we upgrade one of our larger projects, so I'd really like to figure out if it's an IBATIS issue or not. The larger project has tons of these recursive type calls. Thanks in advance for the help. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.