Hello,
I am trying to define a parent/child relationship where the Primary Key of the parent entity is part of the Primary Key of the Child Entity. I have defined the child entity as follows:
Code:
<hibernate-mapping>
<class name="PropertyValueItem" table="property_value_item">
<composite-id name="id" class="PropertyValueItem$Id">
<key-property name="key"
access="field"
column="pv_list_key" />
<key-property name="value"
access="field"
column="value" />
</composite-id>
<property name="description" column="description" />
<property name="order" column="value_order" type="int" />
<many-to-one name="propertyValue"
class="PropertyValue"
column="pv_list_key"
not-null="true"
fetch="select"
insert="false"
update="false" />
</class>
</hibernate-mapping>
However when I go to execute my program I get the following error:
Quote:
Repeated column in mapping for entity: PropertyValueItem column: pv_list_key (should be mapped with insert="false" update="false")
What am I doing wrong? I have defined insert and update to be false
Many Thanks
Andy[/code]