Hello,
I have a composite foreign key that references a composite primary key, like that:
Code:
<class name="MyContainerClass"
table="CONTAINER">
................
<properties name="businessKey" unique="true" insert="false" update="false">
<property name="numeroCRMContrat" column="NUMERO_CRM_CONTRAT" />
<property name="versionContrat" column="VERSION_CONTRAT" />
<property name="idCRMEntitePhysiqueBeneficiaire" column="ID_CRM_EP_BENEFICIAIRE" />
</properties>
<set name="firstSet" inverse="true" fetch="select" >
<key property-ref="businessKey" >
<column name="NUMERO_CRM_CONTRAT"></column>
<column name="VERSION_CONTRAT"></column>
<column name="ID_CRM_EP_BENEFICIAIRE"></column>
</key>
<one-to-many
class="FirstSetElementClass" />
</set>
<set name="secondSet" inverse="true" >
<key property-ref="businessKey">
<column name="NUMERO_CRM_CONTRAT"></column>
<column name="VERSION_CONTRAT"></column>
<column name="ID_CRM_EP_BENEFICIAIRE"></column>
</key>
<one-to-many
class="SecondSetElementClass" />
</set>
</class>
The container contains a Set
zeProduitServiceContratClients, and that works, all object are loaded within the container.
But for the second Set,
secondSet, I just get the FIRST object of the test dataset.
What is the reason ?