Dear all,
I have the following mapping :
Quote:
<hibernate-mapping>
<class name="EserviceElemPersistent" table="ESERVICE_ELEM">
<id name="numEserviceElem" column="PK_ESERVICE_ELEM" unsaved-value="0">
<generator class="sequence">
<param name="sequence">S_ESERVICE_ELEM</param>
</generator>
</id>
</class>
</hibernate-mapping>
I don't know if unsaved-value and sequence are compliant. Actually, even if the key is different from 0, Hibernate creates a new sequence number when saving my object.
Therefore, is it possible to have a sequence and setting unsaved-value or does hibernate trigger each time the sequence ?
Thanks