You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by ra...@wipro.com on 2006/07/27 13:02:46 UTC

Need help---Mapping of Complex properties

I am using this(This is mentioned in the Ibatis doc) to load the data.
<resultMap id="get-product-result" class="com.ibatis.example.Product">

<result property="id" column="PRD_ID"/>

<result property="description" column="PRD_DESCRIPTION"/>

<result property="category" column="PRD_CAT_ID" select="getCategory"/>

</resultMap>

<resultMap id="get-category-result" class="com.ibatis.example.Category">

<result property="id" column="CAT_ID"/>

<result property="description" column="CAT_DESCRIPTION"/>

</resultMap>

<statement id="getProduct" parameterClass="int"
resultMap="get-product-result">

select * from PRODUCT where PRD_ID = #value#

</statement>

<statement id="getCategory" parameterClass="int"
resultMap="get-category-result">

select * from CATEGORY where CAT_ID = #value#

</statement>


I have similar requirement to do lazy initalization. what is the column
PRD_CAT_ID in this ?.


Thanks n Regards,
=============================
Rambabu Piridi.
Software Engineer,
Wipro Technologies,
Madhapur,
Hyderabad.

e-Mail : rambabu.piridi@wipro.com <ma...@wipro.com>
Mobile:  99491 83303.
==============================




The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com