ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shamim <sre...@yandex.ru>
Subject Does anyone have any example of "foreach" with annotation
Date Wed, 05 May 2010 07:18:57 GMT

Hi All,
  i have stuck with dynamic Sql on Ibatis 3 annotations. Trying to pass List
in dynamic sql as follows:

@Update("update ${schemaName}.fuf uf" +
			" set uf.reestr_date = #{reestDate}," +
			" uf.reestr_number = #{reestNum}" +
			" where uf.reestr_number IS not NULL AND uf.reestr_date IS not NULL and
uf.id in " +
			" <foreach item=\"item\" index=\"index\" collection=\"list\""+
			"	open=\"(\" separator=\",\" close=\")\">"+
			"	#{item}"+
			" </foreach>")
	void updateUpffReesterByList(@Param("schemaName") final String schemaName,
@Param("list") List<Long> list, @Param("reestNum") final String reestNum,
@Param("reestDate") final Date reestDate);

Its always throws JDBC exception. May be i am missing something?
Thank'x in Advance

View this message in context: http://old.nabble.com/Does-anyone-have-any-example-of-%22foreach%22-with-annotation-tp28457518p28457518.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