-->
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: How to do versioning in Hibernate
PostPosted: Tue Oct 06, 2009 12:02 am 
Beginner
Beginner

Joined: Thu Dec 11, 2008 2:30 am
Posts: 47
Hi all, I got a problem and here it is,

I have a application and it is subjected for data enter, edit, and view. There are several users here for use this application.
Several users can view same data at same time and also edit can be done.
If two users open same data element, lets say user 'A' and user 'B' and both they view same data element at same time.
lets say that data element is 'Hibernate' then user A edit this data element and save it as 'Spring'. This happens while data element is being viewed by user B.
Now actual data element is 'Spring'(since user A saved it like that).
Now user B saved data element without any modification and it is saved as 'Hibernate'(since both users had open same element).

Now in database the actual data value is 'Hibernate', but user A saved it as 'Spring'. Ok now conflict has taken place.
User A view data again and see that data value is still 'Hibernate', and he cannot think about this. He saved data and now seems it is not saved.

1. What was happened?
2. What is the solution for this which Hibernate can be given?
3. Is Versioning the solution for this situation?
4. If versioning is the solution, how can it be done? (simple procedure to versioning)


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.