I can't seem to find a way to get the result map as a map
My sql is
<select id="retrievePackageHeader" parameterType="java.lang.String" resultType="PackageHeaderMap">
SELECT CONCAT(SCE_WRK_CTRL_NB, AC_CRR_CDE) as row_id,
MTC_CHK_TYP_CDE,
PLNR_REVW_IND,
PLNR_OWD_IND,
PKG_SLOT_TYP_CDE
FROM WSM_PKG_HDR WHERE AC_NB = '${value}';
WITH UR
</select>
Now i need row_id as the map (key) and the other columns as attributes of a bean.
I want to do something like my code below, but I can't find the correct syntax.
<resultMap id="PackageBeanResult" type="PackageBean">
<result property="checkType" column="MTC_CHK_TYP_CDE"/>
<result property="plannerReview" column="PLNR_REVW_IND"/>
<result property="plannerOwned" column="PLNR_OWD_IND" />
<result property="slotType" column="PKG_SLOT_TYP_CDE" />
</resultMap>
<resultMap id="PackageHeaderMap" type="java.util.HashMap">
<result property="java.lang.String" column="row_id"/>
<result property="object" resultMap="PackageBeanResult"/>
</resultMap>
Any ideas?
Thanks.