ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Bibb <richard.b...@aimhedge.com>
Subject Using the foreach statement in iBatis 3.0
Date Wed, 26 Aug 2009 18:43:56 GMT


I'm trying to do a select along the lines of 

<select id="selectBackAdjFutureByDateRange"
parameterType="BAFselectByDateRange" resultMap="results">
		select rec_date, int_field,	data_value
		from back_adj_future
		where feed = #{feed}
		and instrument = #{instrument}
		and periodicity = #{periodicity}
		and	int_field in
		<foreach item="item" index="index" collection="list" open="("
separator="," close=")">
		and rec_date <![CDATA[<]]> #{endDate}
		and rec_date <![CDATA[>]]> #{startDate}
		order by rec_date

The trouble is the <foreach> statement doesn't seem to work. This is because
I can't tell the statement which of piece of member data from parameterType
the statement will use. (the manual seems to indicate that the List/Array
should be the only parameter. 

Can someone point out what I'm doing wrong (if anything)?
View this message in context: http://www.nabble.com/Using-the-foreach-statement-in-iBatis-3.0-tp25152935p25152935.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org

View raw message