开发者

Return a Single Map in IBATIS

I have a SqlMap query that returns 2 columns, an ID and a string. I know how to return a list of maps where the ID is the key and the string is the value. There is one list item for each row returned.

How can I return 1 map with t开发者_运维技巧he IDs as keys and strings as values?


You have to use resultType as Map and if query is returning mutilple rows then in DAO you need to handle it using List<Map<String,Object>>

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜