ITeye博客

ibatis

共 1 篇文章

mybatis中使用in查询时的注意事项

[b]1. 当查询的参数只有一个时 [/b] findByIds(List ids) [b] 1.a 如果参数的类型是List, 则在使用时,collection属性要必须指定为 list[/b] [code="xml"] Select from jria where ID in #{item} [/code] findByIds(Long[] ids) [b] 1.b 如果参数的类型是Array,则在使用时,collection属性要必须指定为 array[/b] [code="xml"] select from jria where ID in #{item} [/code] [b]2.…

2014-03-27 21:59 · ibatis