Please can someone help me with creating auto-increment generator for key property in composite-id.
There is a parent child relationship, and in Child table one key is taken from parent table, but childID should be generated automatically.
Code:
<class name="Child">
<composite-id>
<key-many-to-one name="parent" class="Parent" lazy="false">
<column name="ParentID"></column>
</key-many-to-one>
<key-property name="childID" column="ChildID" type="long"/>
</composite-id>
<property name="someField" column="SomeField" type="string" />
</class>