之前没用过ibatis,想问下在ibatis的xml中的一个问题
<select id="getLastTimeandID" resultClass="?" >
<![CDATA[
select id,ADDTIME from TAB_POLICY where ADDTIME = ( select max(AddTime) from TAB_POLICY)
]]>
</select>
我sql返回的值有2个,resultClass的值设置为什么?
<select id="getLastTimeandID" resultClass="?" >
<![CDATA[
select id,ADDTIME from TAB_POLICY where ADDTIME = ( select max(AddTime) from TAB_POLICY)
]]>
</select>
我sql返回的值有2个,resultClass的值设置为什么?
<result property="id" column="ID" />
<result property="addtime" column="ADDTIME" />
</resultMap>
<select id="getLastTimeandID" resultMap="result" >
<![CDATA[
select id,ADDTIME from TAB_POLICY where ADDTIME = ( select max(AddTime) from TAB_POLICY)
]]>
</select>