Hello,
after further testing I don't use the 'id' from 'FaceLift' anymore and take the other properties as PrimaryKey. Now everything works fine.
Code:
<hibernate-mapping>
<class
name="Model"
table="model"
>
<id name="id" type="long">
<generator class="native"></generator>
</id>
<set name="faceLifts" table="face_lift" access="PropertyAccessor" >
<key column="owner_id"/>
<composite-element class="FaceLift">
<property name="faceLiftDate" type="date" column="face_lift_date" access="PropertyAccessor" />
<property name="description" type="string" access="PropertyAccessor" />
</composite-element>
</set>
<property name="name" type="string" access="PropertyAccessor"/>
</class>
</hibernate-mapping>
Regards
Oliver