ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Medium <contactm...@gmail.com>
Subject Re: Reusing resultmap for nested object
Date Thu, 17 Nov 2005 00:51:23 GMT
Thanks for responding Gilles.

Thats great news. I just couldn't find it in the docs. I also missed it 
in the Not Yet Documented on the wiki.

Thanks again. Gonna go refactor my maps now.

Huy

Gilles Bayon wrote:

> This syntax
> <resultMap id="product">
> <result property="id" column="PRD_ID"/>
> <result property="description" column="PRD_DESCRIPTION"/>
> <result property="category" resultMap="category">
> </resultMap>
>  
> is supported .
>
>  
> On 11/16/05, *Medium* <contactme42@gmail.com 
> <mailto:contactme42@gmail.com>> wrote:
>
>     Hi,
>
>     Is there a way to reuse a resultmap for a nested object ?
>
>     I know how to map it as specified by the docs but its getting a bit
>     unwieldly with all the repetition.
>
>     Docs:
>     <resultMap>
>     <result property="id" column="PRD_ID"/>
>     <result property="description" column="PRD_DESCRIPTION"/>
>     <result property="category.id" column="CAT_ID" />
>     <result property="category.description" column="CAT_DESCRIPTION" />
>     </resultMap>
>
>     Goal:
>     <resultMap id="product">
>     <result property="id" column="PRD_ID"/>
>     <result property="description" column="PRD_DESCRIPTION"/>
>     <result property="category" resultMap="category">
>     </resultMap>
>
>     <resultMap id="category">
>     <result property="id" column="CAT_ID"/>
>     <result property="description" column="CAT_DESCRIPTION"/>
>     </resultMap>
>
>     Any help would be greatly appreciated. A simple yah or nah would
>     do fine
>     as well.
>
>     Thanks
>
>     Huy
>
>


Mime
View raw message