Hi,
The problem I am facing is with repsect to PK of the table. One of them is using oracle sequence and the other is a foreign key of another table which is like a CONSTANT (A number).
When I need to insert data for the object instance, I have to use the compsoite key (one for oracle sequnce and other for the constant).
1. How do I write the custom Id generator for this?
2. How do I mention the id generator in my mapping file?
<composite-id name="id" class="OrdKey" >
<key-many-to-one name="brn" column="BRN" class="Branch" />
<key-property name="ordId" column="ORD_ID" type="java.lang.String" >
</key-property>
</composite-id>
how do make the ORD_ID to be picked up from oracle sequence in the above mapping file. I can't use the <generator class="sequence"> since this is composite id.
Hibernate version: 3
Name and version of the database you are using: Oracle 9i
[/b][/code]
|