You can use queryForMap("STATEMENT-NAME",paramObj,"keyColumn","valueColumn")
bsterner wrote:
>
> Well, if my result map was this...
>
> <resultMap id="diaryResult" class="Map">
> <result property="diaryId" column="DiaryID"/>
> <result property="entryDate" column="EntryDate" jdbcType="DATE"
> javaType="java.util.Date"/>
> </resultMap>
>
> The result is a hashmap with the following entries
>
> diaryId => {DiaryID Value}
> entryDate => {Entry Date Value}
>
> What I want is...
>
> {DiaryID Value} => {Entry Date Value}
>
> One of the columns makes the key, the other the value. Would there be a
> way to do this with a custom type handler, if it cannot be done using the
> standard mapping rules?
>
>
>
>
--
View this message in context:
http://www.nabble.com/resultMap-and-HashMap-tf4924592.html#a14187333
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.