-->
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.  [ 3 posts ] 
Author Message
 Post subject: Version and timestamp
PostPosted: Wed Mar 10, 2004 10:34 am 
Beginner
Beginner

Joined: Tue Feb 17, 2004 11:20 am
Posts: 28
Hi,

I have a table I access with hibernate I need to do optimistic locking.

The table already has a timestamp field which needs to be updated,
although I read that timestamps are not the safe impl. of optimistic locking. So I though of inserting a new field and use hibernate version option to do the locking. but in this case I need to manually update the timestamp in the table.

so the question is the following, can I use BOTH on one class ?

I want Hibernate to update my timestamp as well as the version info.

how would this work with the locking together.

How if I just forget the version field, and use only the timestamp,

what are the downsides of the timestamp solution ?

Thanks a lot!

Istvan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 10, 2004 11:32 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Quote:
I read that timestamps are not the safe impl. of optimistic locking.


I think hb doco has unnecessary FUD at this point, timestamps are fine.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 10, 2004 12:54 pm 
Beginner
Beginner

Joined: Tue Feb 17, 2004 11:20 am
Posts: 28
Thanks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.