ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rao, Satish" <satish....@fmr.com>
Subject RE: Using <iterate>
Date Thu, 07 Jul 2005 20:10:31 GMT
That worked.. Thanks

-----Original Message-----
From: Brandon Goodin [mailto:brandon.goodin@gmail.com] 
Sent: Thursday, July 07, 2005 4:06 PM
To: user-java@ibatis.apache.org
Subject: Re: Using <iterate>


Try....

<select id="listRunDetailsForOrderIds" parameterClass="java.util.List"
resultMap="list-rundetail-result">
                SELECT
                        SSN_N,
                        FST_NM,
                        LST_NM,
                        CHANNEL_TYPE
                FROM
                        ORDER
                WHERE
                <iterate conjunction="OR">
                        SSN_N = #orderIdList[]#
                </iterate>
        </select>

On 7/7/05, Rao, Satish <satish.rao@fmr.com> wrote:
>  
> 
> I have the following <select> and it throws a
UncategorizedSQLException. Is
> there anything wrong with the syntax? 
>  
> 
>         <select id="listRunDetailsForOrderIds"
> parameterClass="java.util.List"
> resultMap="list-rundetail-result"> 
>                 SELECT 
>                         SSN_N, 
>                         FST_NM, 
>                         LST_NM, 
>                         CHANNEL_TYPE 
>                 FROM 
>                         ORDER 
>                 WHERE 
>                 <iterate property="orderIdList" conjunction="OR"> 
>                         SSN_N = #orderIdList[]# 
>                 </iterate> 
>         </select> 
> 
> Here's the java call... 
> 
>         List runDetailList =
>
super.getSqlMapClientTemplate().queryForList("listRunDetailsForOrderIds"
,
> orderIdList); 
> 
> orderIdList is a java.util.List and contains a bunch of String
objects. 
>  
>  
>

Mime
View raw message