ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles Bayon <ibatis....@gmail.com>
Subject Re: Reusing resultmap for nested object
Date Wed, 16 Nov 2005 17:01:50 GMT
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> 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