-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: OCC with Oracle pseudo column ORA_ROWSCN
PostPosted: Thu Feb 15, 2007 1:33 pm 
Newbie

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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.