-
setParameterList方法
select * from table0 where col0 in(:arg0)query.setparameterList("arg0",collect0); -
拼串
List<String> ids; String joinStr = String.join("','",ids); String sql = "select * from table0 where col0 in('"+joinStr +"')";
hibernate设置集合为sql参数,sql为in方法设置参数
最新推荐文章于 2022-06-07 10:53:49 发布
本文介绍了一种使用setParameterList方法进行批量参数查询的方法,并提供了一种通过字符串拼接方式实现in子句的替代方案。
737

被折叠的 条评论
为什么被折叠?



