iBatis使用set作为resultMap以及parameterMap [英] iBatis using a set for a resultMap as well as a parameterMap
本文介绍了iBatis使用set作为resultMap以及parameterMap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在iBatis查询中传递一组字符串作为参数映射,并为结果集返回一个字符串集合.
I want to pass a Set of Strings in an iBatis query for the parameter map as well as return a collection of strings for the result set.
这可能吗?
示例查询...
SELECT * FROM some_table t WHERE t.some_column IN (values);
UPDATE some_table t SET t.some_column = 'some_value' WHERE t.other_column IN (values);
沃尔特
推荐答案
如果要将字符串列表作为一个参数传递,例如用于构建IN(val1,val2...)
查询,则应阅读 dynamic 查询,尤其是迭代元素.另请参见 .
If you want to pass a List of Strings as one parameter, for example for building a IN(val1,val2...)
query, then you should read about dynamic queries, in particular the Iterate element. See also.
这篇关于iBatis使用set作为resultMap以及parameterMap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文