HashMap 은 순서가 보장되어 있지 않는다.
HashMap이 아닌 LinkedHashMap을 사용하면 순서가 보장된다.
ibatis
<select id="selectTestList" parameterClass="java.util.Map" resultClass="java.util.LinkedHashMap" remapResults="true">
</select >
mybatis
<select id="selectTestList" parameterType="dto" resultType="java.util.LinkedHashMap">
</select>
'SQL(XML)' 카테고리의 다른 글
오라클 List 값 MERGE시키기 (0) | 2021.11.17 |
---|---|
오라클 그룹화 한줄로 만들기 (0) | 2021.11.02 |