my mapping file looks now as the following:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="orm">
<class name="ObjectItem" table="OBJ_ITEM">
<meta attribute="class-description">Represents an Object Item</meta>
<id name="id" column="obj_item_id" type="java.lang.Long">
<generator class="native"/>
</id>
<property name="categoryCode" column="cat_code" type="string" length="6" not-null="true"/>
<property name="name" column="name" type="string" length="100" not-null="true"/>
<property name="alternateIdentificationText" column="altn_identific_txt" type="string" length="255"/>
<property name="ownerId" column="owner_id" type="long" not-null="true"/>
<property name="updateSeqNo" column="update_seqnr" type="long" not-null="true"/>
<list name="capabilities" table="OBJ_ITEM_CAPAB" cascade="all">
<meta attribute="use-in-tostring">true</meta>
<key column="obj_item_id"/>
<index column="obj_item_capab_ix" />
<composite-element class="ObjectItemCapability">
<many-to-one name="capability" class="Capability" cascade="all">
<meta attribute="use-in-tostring">true</meta>
<column name="capab_id"/>
</many-to-one>
<property name="missionPrimacyCode" column="msn_primacy_code" type="string" length="6"/>
<property name="reportingDataId" column="rptd_id" type="long"/>
<property name="ownerId" column="owner_id" type="long" not-null="true"/>
<property name="updateSeqNo" column="update_seqnr" type="long" not-null="true"/>
</composite-element>
</list>
<list name="locations" table="OBJ_ITEM_LOC" cascade="all">
<meta attribute="use-in-tostring">true</meta>
<key column="obj_item_id"/>
<index column="obj_item_loc_ix" />
<composite-element class="ObjectItemLocation">
<many-to-one name="location" column="loc_id" class="Location" cascade="all">
<meta attribute="use-in-tostring">true</meta>
</many-to-one>
<property name="accuracyQuantity" column="acc_qty" type="double" not-null="false"/>
<property name="bearingAngle" column="brng_angle" type="double" not-null="false"/>
<property name="bearingAccuracyAngle" column="brng_acc_angle" type="double" not-null="false"/>
<property name="speedRate" column="speed_rate" type="double" not-null="false"/>
<property name="speedAccuracyRate" column="speed_acc_rate" type="double" not-null="false"/>
<property name="useCatCode" column="use_cat_code" type="string" length="6" not-null="true"/>
<property name="reportingDataId" column="rptd_id" type="long"/>
<property name="ownerId" column="owner_id" type="long" not-null="true"/>
<property name="updateSeqNo" column="update_seqnr" type="long" not-null="true"/>
</composite-element>
</list>
</class>
</hibernate-mapping>
the only wish i have, is that the
obj_item_capab_ix and the
obj_item_loc_ix will be generated using the native generator. how to do that? i tried it somehow, but it doesn´t work!