You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Carson Reinke <cr...@MarketingAssociates.com> on 2005/06/27 19:56:41 UTC

Map of Objects for Result

Is there a way to create a HashMap of objects with a result map?  I was
thinking something like this:

<resultMap id="resultId1" class="java.util.HashMap">
	<result property="obj1.column1" column="COLUMN1"/>
	<result property="obj2.column2" column="COLUMN2"/>
</resultMap>

But that doesn't work because iBATIS does not know what "obj1" and
"obj2" are.  Any ideas w/o setting the "select" property?

Thanks.

Carson Reinke
creinke@marketingassociates.com
P: 248.333.7700 x108  

Re: Map of Objects for Result

Posted by Nathan Maves <Na...@Sun.COM>.
Please read starting page 24 of the manual concerning "Map Results"

Nathan

On Jun 27, 2005, at 11:56 AM, Carson Reinke wrote:

> Is there a way to create a HashMap of objects with a result map?  I  
> was
> thinking something like this:
>
> <resultMap id="resultId1" class="java.util.HashMap">
>     <result property="obj1.column1" column="COLUMN1"/>
>     <result property="obj2.column2" column="COLUMN2"/>
> </resultMap>
>
> But that doesn't work because iBATIS does not know what "obj1" and
> "obj2" are.  Any ideas w/o setting the "select" property?
>
> Thanks.
>
> Carson Reinke
> creinke@marketingassociates.com
> P: 248.333.7700 x108
>