Perhaps with the shiny new SqlBuilder... :-) On 2010-05-05, Jeff Butler <jeffgbut...@gmail.com> wrote: > IIRC, iBATIS doesn't support dynamic SQL in annotations. You'll need > to use an @UpdateProvider and generate the dynamic SQL yourself. > > Jeff > > On Wed, May 5, 2010 at 2:18 AM, shamim <sre...@yandex.ru> wrote: >> >> 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 >> Shamim >> >> >> -- >> 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-unsubscr...@ibatis.apache.org >> For additional commands, e-mail: user-java-h...@ibatis.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org > For additional commands, e-mail: user-java-h...@ibatis.apache.org > >
-- Sent from my mobile device --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org