假设有如下表table:
id | str ---|--- 1 | B 1 | A sql:
select id, str from table order by str; 显然会返回:
id | str ---|--- 1 | A 1 | B 考虑如下mybatis mapper:
<resultMap type="someType" id="rm"> <id property="id" column="id" /> <collection property="strs" ofType="String"> </collection> </resultMap> 属性id为1,属性strs类型为List<String>,它的值一定会是["A","B"]吗?
列表(
List)与结果集的顺序一致。一周热门 更多>