ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Goodin <brandon.goo...@gmail.com>
Subject Re: Using <iterate>
Date Thu, 07 Jul 2005 20:05:58 GMT
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