Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 15498 invoked from network); 11 Feb 2009 22:24:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Feb 2009 22:24:50 -0000 Received: (qmail 32817 invoked by uid 500); 11 Feb 2009 22:24:48 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 32609 invoked by uid 500); 11 Feb 2009 22:24:47 -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 32600 invoked by uid 99); 11 Feb 2009 22:24:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Feb 2009 14:24:47 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jeffgbutler@gmail.com designates 74.125.44.157 as permitted sender) Received: from [74.125.44.157] (HELO yx-out-1718.google.com) (74.125.44.157) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Feb 2009 22:24:40 +0000 Received: by yx-out-1718.google.com with SMTP id 3so263982yxi.6 for ; Wed, 11 Feb 2009 14:24:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=zDzwK4BrL8O1s+IcvxRuLAyz+sZAvmazGdbb3dy143o=; b=auhouKGmBDRDIRQoQB712pDFCZkLt1Q4OYTyAKHUC6YH3n/KoSYz5VJKk2+EnUoyU2 v6Pl+m2Celn+9jM3GlJxFDhXlVkSUMxUMoa53QBuESacXKrcxYh6vmeaHlCTWscHxtaz osB5yiitd9IDzyPMNrLSWFFmASEU7I2ue4j5k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=hIOeMTfXCPMcGhdPCJWymo+9JeG3rVvbttTPs3pYl2Rcnu3GdEZOL8tEq6zSOo0d03 ljpljPb96nYsK5HHgCu47r+Z95oibZLkp+zFGmo/38THrIsfaMZn+MiagzFpoB/ExOtk xkUYcMuYYAqa4Sgo/4g0IFp7i9Yk/8/8UcrfM= MIME-Version: 1.0 Received: by 10.150.158.10 with SMTP id g10mr292643ybe.209.1234391059340; Wed, 11 Feb 2009 14:24:19 -0800 (PST) In-Reply-To: <00d401c98c7f$9c164450$d442ccf0$@com> References: <50660FB7D5A72645933E13611D51D54A3496139E92@mailserver.vnl.in> <49894EEB.8070104@asci-systemhaus.de> <00d401c98c7f$9c164450$d442ccf0$@com> Date: Wed, 11 Feb 2009 16:24:19 -0600 Message-ID: Subject: Re: position while iterating From: Jeff Butler To: user-java@ibatis.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org There is not a way to determine the position in the list. I would add the alias as an attribute somewhere in the parameter object and calculate it in Java ($attributes[].alias). Jeff Butler On Wed, Feb 11, 2009 at 1:33 PM, Chris O'Connell wrote: > Is there any way to find my position while iterating through a collection in > the sqlMap file. For example, I want to do something like this: > > > > ,( > > SELECT TEMP_PA.PRODUCT_ID > FROM PRODUCT_ATTRIBUTES TEMP_PA, > ATTRIBUTES TEMP_A > WHERE ( > TEMP_A.ATTRIBUTE_ID = TEMP_PA.ATTRIBUTE_ID > AND TEMP_A.NAME = #attributes[].name# > > property="attributes[].values[].value"> > > TEMP_PA.VALUE = > #attributes[].values[].value# > > > > ) > ) TEMP$attributes[].name$_{POSITION_IN_ITERATION} > > > I may have multiple attributes with the same name, so I need something that > will allow me to uniquely name this alias. Anyone have any ideas? > > Thanks, > Chris > > >