I have a JavaBean with several properties. Some of these properties are
other JavaBeans. Currently with the code I have I can load these
complex properties, however, it is only loading 1 property. Here is my
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>
<statement id="getIssue" parameterClass="int"
resultMap="get-issue-result">
SELECT * FROM t_issue, t_user WHERE creating_user_id = user_id
AND issue_id = #value#
</statement>
Now, when I run this and in my java code I want to get the information
about the createdByUser which is of a type User.java. The only property
in User.java that is being populated in userId. I need also all the
other properties to be populated. Now, I understand why only 1 property
is being filled in User.java. But I don't know how to achieve the
desired functionality I need.
Thanks
Gregg