开发者

Iterate List<Map> in Ibatis

How to Iterate List in Ibatis.

query is:

delete from table where (column1='tes10' and column2='NET1' and column3='ENG1') OR (column1='TEST22' and column2='NET2' and column3='ENG2') OR (column1='TEST21' and column2='NET3' and column3='ENG3').

I put column values in map and then i will pass this to ibatis statement asList.Now my question is how can i iterate List so that dyanmic quesry would be loke the ab开发者_如何学Pythonove one.


Here is an example of iterate.

<iterate property="someCollection" open="(" close=")" conjunction=",">
    #someCollection[]#
</iterate>

Let's say we have a string array = {"one","two","three"}.

The result of this iterate method would be,

('one','two','three')

Your case seems awkard, why do you need to compare so many values?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜