Joined: Mon Aug 08, 2005 5:57 am Posts: 6
|
I have a table mapped like so:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<!--
Auto-generated mapping file from
the hibernate.org cfg2hbm engine
-->
<class name="uk.audit.glue.Action" table="ACTION" schema="AUDIT">
<id name="actionSan" type="big_decimal">
<column name="ACTION_SAN" precision="22" scale="0" />
<generator class="uk.domain.generator.AIdentifierAudit" />
</id>
<many-to-one name="loginSession" class="uk.audit.glue.LoginSession">
<column name="LOGINSESSION_SAN" precision="22" scale="0" not-null="true" />
</many-to-one>
<many-to-one name="actionType" class="uk.audit.glue.ActionType">
<column name="ACTIONTYPE_SAN" precision="22" scale="0" not-null="true" />
</many-to-one>
<property name="actionTime" type="timestamp">
<column name="ACTION_TIME" length="7" />
</property>
<property name="actionResultCount" type="big_decimal">
<column name="ACTION_RESULT_COUNT" precision="22" scale="0" />
</property>
<property name="actionCriteria" type="string">
<column name="ACTION_CRITERIA" length="2000" />
</property>
</class>
</hibernate-mapping>
Currently the id is generated using the AIdentifierAudit class. However I wish to change this to have Oracle handle the primary key generation. What should I change the mapping to, to stop Hibernate passing a primary key when inserting a new row?
Thanks
|
|