Thank you for your reply.
Yes, I have done that.
But now I'm trying to make cart to have a HeatKit.
The relationship is many to one.
Code:
<many-to-one name="heatKit"
class="com.mycompany.HeatKit"
insert="false" update="false" not-null="true"
fetch="join" lazy="false">
<column name="HEATKITMODEL"/>
</many-to-one>
This mapping will complain that it's missing another key since HeatKit has composite key.
I was trying to put use the other foreign key, which is TableName, but cart doesnt have it. It needs to get it from ProductTable. Is it possible to do this in the mapping?