-->
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: Up to date objects probelm
PostPosted: Thu Jan 29, 2004 8:41 am 
Newbie

Joined: Thu Jan 08, 2004 6:28 am
Posts: 11
Hi,

I can't understand how(if it all) hibernate make sure the object that I want to update with the database are up to date.

For example:
I am using session per "unit-of-work", meaning when a request is coming create or reconnect the session, and when he leave I disconnect the session.
Now, there are 2 users that asked for the same order information and the first user was update the order and right after him the second user try to update the same order.
Do I have an option to know that the object was changed? or do I need to load or refresh the object each time before I update it?

I read something about the LockMode but I didn't understant it and when I tested it, it didn't work.

Avi


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 29, 2004 9:35 am 
Beginner
Beginner

Joined: Tue Nov 11, 2003 4:49 am
Posts: 47
Location: Florence, Italy
I think versioning can be an option.
http://www.hibernate.org/hib_docs/reference/html_single/#transactions-s3
Ciao.


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.