-->
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: Is this possible with Hibernate?
PostPosted: Mon Mar 09, 2009 10:14 pm 
Newbie

Joined: Mon Mar 09, 2009 2:20 pm
Posts: 1
I'm not sure if anyone has actually done something like this but theoretically it sounds plausible.

Basically I need to clone an entire object graph for the possibility of edits. These edits can be approved or rejected down the line.
If the edits are rejected the original values are kept in place.
If they are approved the clone becomes the new graph but the original id needs to be the same.

Now, I would need to determine all the difference in a fairly complicated graph for all the updates, additions and deletions when merging the edits

What I was thinking might be possible is if I could perform id updates on the clone replacing that with the original and merge the base entity and allow the cascade to handle the modifications.

Would something like this work or will there be issues with Hibernate?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 10, 2009 7:15 am 
Regular
Regular

Joined: Wed Oct 15, 2008 6:59 am
Posts: 103
Location: Chennai
hibernate takes care of all it's updates from detached objects. i think u have to use merge() method with ur Cloned object.

_________________
If u feel it will help you, don't forget to rate me....


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.