开发者

Does Ibatis support Sets as parameter classes?

开发者 https://www.devze.com 2023-02-05 00:42 出处:网络
Does anyone know if Ibatis accepts Sets as parameter classes? I didn\'t see any docs on it, but when I did t开发者_StackOverflow中文版ry it failed and told me it was looking for a list.It depends on u

Does anyone know if Ibatis accepts Sets as parameter classes? I didn't see any docs on it, but when I did t开发者_StackOverflow中文版ry it failed and told me it was looking for a list.


It depends on usage. If you would like to iterate the elements of set for building IN (...) query, there is a way to do that with using iterate element. If it doesnt work you might need to convert your Set to List and pass your variable as a list.

List list = new ArrayList(new HashSet());
0

精彩评论

暂无评论...
验证码 换一张
取 消