Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 66802 invoked from network); 12 Jan 2007 03:23:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2007 03:23:08 -0000 Received: (qmail 1644 invoked by uid 500); 12 Jan 2007 03:23:08 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 1606 invoked by uid 500); 12 Jan 2007 03:23:08 -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 1594 invoked by uid 99); 12 Jan 2007 03:23:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jan 2007 19:23:08 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [192.223.158.56] (HELO gw-col004.proxy.uk.fid-intl.com) (192.223.158.56) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Jan 2007 19:22:58 -0800 Received: from mail81.uk.fid-intl.com (mail81.uk.fid-intl.com [10.160.187.11]) by gw-col004.proxy.uk.fid-intl.com (8.13.6/8.13.6) with ESMTP id l0C3Ma5X020059 for ; Fri, 12 Jan 2007 03:22:37 GMT Received: from ukhil718nts.uk.fid-intl.com (ukhil718nts.uk.fid-intl.com [10.160.142.52]) by mail81.uk.fid-intl.com (8.11.7p1+Sun/8.11.7) with ESMTP id l0C3Map07163 for ; Fri, 12 Jan 2007 03:22:36 GMT Received: by ukhil718nts.uk.fid-intl.com with Internet Mail Service (5.5.2657.72) id ; Fri, 12 Jan 2007 03:22:36 -0000 Message-ID: <697DB8FEDD187844AF9A6DFAD66DAFE309A740A8@indel702nts.in.fid-intl.com> From: "Goel, Sachin" To: "'user-java@ibatis.apache.org'" Subject: RE: IN - representation in IBATIS Date: Fri, 12 Jan 2007 03:22:36 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C735F8.AC0E8906" X-Virus-Checked: Checked by ClamAV on apache.org This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C735F8.AC0E8906 Content-Type: text/plain You may try this as well(assuming you have an array to be used in IN clause) #types[]# Thanks and Regards Sachin Goel _____ From: Adnan Atic [mailto:Adnan_Atic@hilton.com] Sent: Thursday, 11 January 2007 15:36 To: user-java@ibatis.apache.org Subject: IN - representation in IBATIS I am not sure how to represent this SQL construct in ibatis sql config files : SELECT A.* FROM USER A WHERE TYPE IN (?,?,...) Is there something like: Thanks ------_=_NextPart_001_01C735F8.AC0E8906 Content-Type: text/html Message
You may try this as well(assuming you have an array to be used in IN clause)
 

<dynamic prepend="AND" >

<isNotEmpty property="types">

<iterate property="types" open="TYPE  IN (" close=")" conjunction=",">

#types[]#

</iterate>

</isNotEmpty>

</dynamic>

 
 

Thanks and Regards
Sachin Goel


From: Adnan Atic [mailto:Adnan_Atic@hilton.com]
Sent: Thursday, 11 January 2007 15:36
To: user-java@ibatis.apache.org
Subject: IN - representation in IBATIS

I am not sure how to represent this SQL construct in ibatis sql config files :
 
SELECT A.*
    FROM USER A
 WHERE TYPE IN (?,?,...)
 
Is there something like:

<select id="getUsers" resultMap="userResultMap" parameterClass="java.util.List">

SELECT A.*
    FROM USER A
 WHERE TYPE IN (#types#)

</select>

 

Thanks

------_=_NextPart_001_01C735F8.AC0E8906--