-->
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: Issue with <version generated="always" type=&am
PostPosted: Thu Dec 14, 2006 2:21 pm 
Newbie

Joined: Thu Dec 14, 2006 2:12 pm
Posts: 1
I'm running Hibernate 3.2.1 GA. I have an object which has in it's mapping
<version name="foo" generated="always" type="timestamp"/>

It appears that the generated="always", which based on the documentation tells Hibernate that the value is generated by the underlying DB isn't working as I get the following debug log entry on attempting to flush the modified object:


DEBUG hibernate.engine.Versioning:27 - Incrementing: 2006-12-14 09:39:03 to 2006-12-14 10:15:54

Which leads to:

Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)

I'm using saveOrUpdate to notify Hibernate of the need to persist the changes.

I've looked at the open bugs list, I did not find any bugs that seemed to be directly related.

Any help is appreciated.

UPDATE: setting generated="never" still results in a version increment but not an exception.


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.