Hello,
I have a special scenario where I have more than one Sequence generated key on my table.
My table in the oracle database has the following fields
CUST_AFFILIATION_ID PRE_REGISTRATION_ID LAST_UPDATE_TMSTMP LAST_UPDATE_USER_ID
where CUST_AFFILIATION_ID is the primary key on the table, and a sequence generated key.
So in the hibernate mapping file, I use
<id name="CustomerAffiliationId" type="java.lang.Long" column="CUST_AFFILIATION_ID" unsaved-value="null">
<generator class="sequence">
<param name="sequence">CUST_AFFIL_SEQ</param>
</generator>
</id>
But the next column in the table"PRE_REGISTRATION_ID" is also a sequence generated value, but is not a primary or composite key. It is just a plain column in the table, but the valus is generated from the Sequence.
Can any one help me on how to write a hibernate mapping for this field?
Any immediate help would be very much appreciated.
_________________ kanumolu
|