Hi
In my mapping a part of my primary key(
Literal) is a foreign (composite) key (of
Enumeration). I get the following exception:
identifier of an instance of model.Literal altered from model.Literal@1112776 to model.Literal@1112776.
I don't know where and how the PK of Literal must be set.
Here is the mapping of Literal:
Code:
<hibernate-mapping package="model">
<class
name="Literal"
table="literal"
>
<composite-id>
<key-property name="packageid" type="java.lang.Long"/>
<key-property name="name" type="java.lang.String"/>
<key-property
name="name"
type="java.lang.String"
column="name"
/>
</composite-id>
<many-to-one
name="pk_enum"
insert="false"
update="false"
class="Enum">
<column name="packageid"/>
<column name="name"/>
</many-to-one>
<property...
and this is the Mapping of Enum:
Code:
<hibernate-mapping package="model">
<class
name="Enum"
table="enum"
>
<composite-id>
<key-many-to-one
name="packageid"
class="Xpackage"
column="packageid"
/>
<key-property
name="name"
column="name"
type="java.lang.String"
/>
</composite-id>
<property...
Any help is greatly appreciated!
Thanks in advance,
Kurt