ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bolinger, Gregg D" <Gregg.Bolin...@intrustbank.com>
Subject RE: Mapping Complex Properties (Load all properties)
Date Thu, 06 Jan 2005 20:01:04 GMT
I assume you mean:

<result property="createdByUser.userId" column="creating_user_id" />

Well, would I map my other properties lke

<result property="createdByUser.firstName" column="creating_user_id" />
<result property="createdByUser.lastName" column="creating_user_id" />

If so, is that the only way?  If not, then could you explain what you
mean?  Or maybe we are both misunderstanding each other. :)



-----Original Message-----
From: Larry Meadors [mailto:larry.meadors@gmail.com] 
Sent: Thursday, January 06, 2005 1:58 PM
To: ibatis-user-java@incubator.apache.org
Subject: Re: Mapping Complex Properties (Load all properties)

Am I reading this wrong? It looks to me like that is the only result
you have mapped to that bean. The others are all to the Issue bean.

Add other properties, and they will get mapped.


On Thu, 6 Jan 2005 13:49:24 -0600, Bolinger, Gregg D
<Gregg.Bolinger@intrustbank.com> wrote:
> I have a JavaBean with several properties.  Some of these properties
> other JavaBeans.  Currently with the code I have I can load these
> complex properties, however, it is only loading 1 property.  Here is
> file(s)
> <resultMap id="get-issue-result"
> class="com.intrust.anykey.web.modelbeans.Issue">
>         <result property="issueId" column="issue_id"/>
>         <result property="dateCreated" column="date_created"
>           javaType="java.util.Date"/>
>         <result property="dateAccepted" column="date_accepted"
>           javaType="java.util.Date"/>
>         <result property="dateResolved" column="date_resolved"
>           javaType="java.util.Date"/>
>         <result property="dateModified" column="date_modified"
>           javaType="java.util.Date"/>
>         <result property="createdByUser.userId"
>           column="creating_user_id" />
>         <result property="issueNumber" column="issue_number"/>
>     </resultMap>

View raw message