I have a persistent object with composite key. The composite key is not mapped with a Java class, instead, it is mapped as follows:
<composite-id>
<key-property
name="P1"
column="OPERATION_ABBR"
type="java.lang.String"
length="255"
/>
<key-property
name="roleAbbr"
column="ROLE_ABBR"
type="java.lang.String"
length="255"
/>
</composite-id>
How can I use session.load or session.get to retrieve this object from the persistence store using the composite key?
(btw, I knew how it can loaded if it is mapped with a Java class: <composite-id class="CompPk">... )
Any help is greatly appreciated.
|