Hibernate version: 3.0 alpha
I am tryin to map one class to many tables (many of them are part of the outer join). The system is trying to re-use the key that I define for the first table for the <join> elements. However, the joins use different keys. This is the code:
Code:
<class name="Contract" table="CONTRACT">
<composite-id name="contractPK" class="ContractPK">
<key-property name="contractId" column="CNT_ID" />
<key-property name="contractIssueCd" column="CNT_ISS_CD" />
</composite-id>
<join table="CONTRACT_2">
<key>
<column name="CNT_ID" />
<column name="CNT_ISS_CD" />
<!-- I need to specify these condifions also: -->
<!-- DAT_SRC_CD (+) = DAT_SRC_CD -->
<!-- CTCP_CD (+) = 'BSE' -->
</key>
</join>
</class>
Can anyone help?