Joined: Thu Feb 15, 2007 1:00 pm Posts: 1
|
Hibernate version:
3.2.1
Name and version of the database you are using:
Oracle 10g
Background:
I am trying to implement optimistic locking using the version property and the Oracle pseudo column ORA_ROWSCN. On an insert, I see that immediately after the insert statement but before the commit Hibernate issues a select to retrieve the value of ORA_ROWSCN. At this point the value is null. This causes Hibernate to throw an exception as the version property to whcih the value or ORA_ROWSCN maps cannot be null.
It is not possible to assign a default value to ORA_ROWSCN and I do not want to use a timestamp.
Question
How should version and ORA_ROWSCN work together? Or should I create my own version column and manage the version myself?
T.
|
|