ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zarar Siddiqi" <zarar.sidd...@utoronto.ca>
Subject Re: RNeed help with Returning different type in resultMap attribute
Date Thu, 13 Apr 2006 03:52:42 GMT
I think this is what you're asking for:

http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+get+a+Map+of+results+instead+of+a+List

Zarar


----- Original Message ----- 
From: "anita m" <anita1766@yahoo.com>
To: <user-java@ibatis.apache.org>
Sent: Wednesday, April 12, 2006 9:36 PM
Subject: RNeed help with Returning different type in resultMap attribute


>I have the following
>
> <resultmap id="allCategories" class="Category" >
> <result property="categoryid" column="categoryid" />
> <result property="prods" resultMap="mymap.products"/>
> </resultMap>
>
> <resultMap id="mymap.products" class="Product" >
> <result property="name" column="productname"/>
> </resultMap>
> <statement id="getAll" resultMap="allCategories">
> ...
> </statement>
>
> when i execute "getAll", category.getProds() returns
> Collection of procuts. Is there any way I can get
> category.getProds to return a HashMap instead of a
> collection ?
> Thanks
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> 



Mime
View raw message