Composite Key in Toplink Mapping File - equivalent to Hibernate?
953418Aug 2 2012 — edited Aug 9 2012Hi,
I have a POJO TestEntity which refers to primary key TestEntityKey. In Hibernate mapping hbm file, we define the entry as:
<composite-id name="id" class="TestEntityKey">
<key-property name ="testEntityCode" column = "TEST_ENT_CODE" type = "string" />
</composite-id>
Please confirm how to create the composite id in Toplink means kindly help that how to map my id to key:
<opm:primary-key>
<opm:attribute-name>id</opm:attribute-name>
<opm:field table="TEST_ENTITY_B" name="TEST_ENT_CODE" xsi:type="opm:column"/>
</opm:primary-key>
Thanks!