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.  [ 2 posts ] 
Author Message
 Post subject: timestamp version issue StaleObjectStateException
PostPosted: Tue Sep 26, 2006 2:46 pm 
Beginner
Beginner

Joined: Thu Jun 29, 2006 12:32 pm
Posts: 22
Hibernate version: 1.2.beta1

Database: SQL Express SP1

The problem is with using a timestamp as the versioning property.

When the object is persisted to the database, the value that MSSQL stores is not as accurate as the .NET DateTime value stored in the object.

When the object is persisted the next time, this line:

persister.VersionType.Equals(persister.GetVersion(result), persister.GetVersion(obj))

in SessionImpl.cs fails, because there is a 1ms difference between the DB stored version and the current version.


Cheers,

Stu

_________________
--
Stuart Carnie


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 3:15 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
There's a JIRA issue for this already.


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

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.