-->
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: Can I use both version and timestamp element together?
PostPosted: Fri Aug 12, 2005 2:39 am 
Newbie

Joined: Thu Jun 23, 2005 10:25 pm
Posts: 3
I want to use a version element for optimistic locking, and a timestamp element to be automatic updated every time the entity is updated.
How to do it? How to get a auto-updated timestamp property but not use it for optimistic locking?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 2:44 am 
Expert
Expert

Joined: Thu Sep 04, 2003 8:23 am
Posts: 368
In the dtd this is not allowed. Why don't you want to use your timestamp for optimistic locking if you need a timestamp ?
Alternatively you can use a version for optimistic locking and manage your timestamp manually

_________________
Seb
(Please don't forget to give credits if you found this answer useful :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 12, 2005 5:00 am 
Newbie

Joined: Thu Jun 23, 2005 10:25 pm
Posts: 3
Yes, I think you had telled me all the truth, but since timestamps are not unique, it's better to use version for optimistic locking.
And yes I can do any job manually, but I hope hibernate can update timestamp for me.


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.