Joined: Wed Jan 10, 2007 1:40 pm Posts: 12
|
I have an object where I populate information with and just use the save option with session - session.save(object). Hibernate uses the oracle sequence generator to populate the primary key to the row entry. The problem is that at times, I want to insert my own primary key and not use the sequence generator. Is there a way to disable the sequence generator from retrieving the next sequence so I can just insert the key that I created?
<hibernate-mapping>
<class name="uchicago.nsit.accts.data.valueobject.DPHeaderVO" table="DX_HEADER" schema="DBAACCTS" lazy="false" >
<id name="controlNumber" >
<column name="CONTROLNUM" />
<generator class="sequence" >
<param name="sequence">SEQ_CTRNO</param>
</generator>
</id>
<property name="explanation" >
<column name="EXPLANATION" length="300" />
</property>
......
The sequence is SEQ_CTRNO.
I can't find anything that will work so help.
|
|