<class name="User" table="USERS">
<id name="id" column="ID"/>
<property name="tmpid" column="TMPID"/>
<set name="items" table="ITEMS">
<key column="ITEMID"/>
<element column="INFO" type="string"/>
</set>
</class>
=============================
If User.id = 4, then the resulting User Object has a collection of items object where each item object's ITEMID is equal to 4 as well.
What if the user object need to retrieve a collection of item objects where each item objects's ITEMID is equals to USERS.TMPID column, instead of the primary key column? It is possible?
I am very new to this hibnerate product. I am grateful for any info you can offer.
Thanks.
zollen
|