But there aren't other columns for those properties.  Let me explain...
Here is some test code.  T_user and t_issue are tables in a database.
Below that are 2 java files.  This is pseudo code and outlook keeps
correctly cap mistakes so don't poke fun at the bad syntax. :)

t_user
------
User_id
First_name
Last_name

T_issue
--------
Issue_id
User_id

Issue.java
----------
Public class Issue
{
        Private int issueId;
        Private User user;
        //getters and setters
}

User.java
-----------
Public class User
{
        Private int userId;
        Private int firstName;
        Private int lastName;
        //getters and setters
}

When I query for an Issue and return an Issue.java object, I need User
to be populated with the appropriate user for that issue.  Does that
make more sense?

Gregg

-----Original Message-----
From: Larry Meadors [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 06, 2005 2:08 PM
To: Bolinger, Gregg D
Subject: Re: Mapping Complex Properties (Load all properties)

Well, I would assume you'd map other columns to those properties, but
yeah, you have the idea. :-)

Larry

On Thu, 6 Jan 2005 14:01:04 -0600, Bolinger, Gregg D
<[EMAIL PROTECTED]> wrote:
> 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" />

Reply via email to