hello together,
i have to map a very tricky database schema. i have a table, with a composed primary key of two foreign keys and one native generated key.
my first aproach for the primary key looked like this:
Code:
<composite-id>
<key-many-to-one name="ObjectItem" column="OBJ_ITEM_ID" class="ObjectItem"/>
<key-many-to-one name="Capability" column="capap_id" class="Capability"/>
<key-property name="id" column="obj_item_capab_index" type="java.lang.Long"/>
</composite-id>
but how can i say that the obj_item_capab_index should be generated automatically analog to:
Code:
<id name="id" column="obj_item_capab_ix" type="java.lang.Long" unsaved-value="null">
<generator class="native"/>
</id>
anybody an idea?