ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rao, Satish" <satish....@fmr.com>
Subject Using WHERE IN along with AND
Date Thu, 14 Jul 2005 15:23:15 GMT

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


Mime
View raw message