Title: Using WHERE IN along with AND

I have the following <select> and it throws a UncategorizedSQL exception…

        <select id="listDetailsForOrderIds" parameterClass="java.util.List" resultMap="list-rundetail-result">
                SELECT
                        R.ORD_ID AS ORD_ID,
                        PART_ID,
                        CLNT_ID_N,
                        PLAN_N,
                        PROD_ID_C,
                        OFFR_C,
                        PRTY_N,
                        EMAIL_ADDR_X
                FROM
                        TABLE1 R, TABLE2 O
                <dynamic prepend="WHERE">
                <iterate
                     open=" R.ORD_ID IN ("
                     close=")" conjunction=",">
                     #orderIdList[]#
                </iterate>
                <isNotEmpty prepend="AND" property="orderIdList">
                        R.ORD_ID = O.ORD_ID
                </isNotEmpty>
                </dynamic>
        </select>

It works correctly without the <isNotEmpty> tag. But as soon as I add the <isNotEmpty> construct it throws a Uncategorized SQL Exception. Can we not pass a java.util.List property type to <isNotEmpty> tag?

orderIdList is a java.util.List

Reply via email to