-->
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: Undo/Redo for removed objects
PostPosted: Tue Oct 10, 2006 3:44 am 
Newbie

Joined: Mon Jan 12, 2004 5:46 pm
Posts: 8
Hi,
I have a SWING application using a long lived hibernate session for as long as the application is running. The application uses a single inprocess DB and is single threaded. I have to implement undo/redo for removing objects from hibernate. I make use of the CommandPattern for storing a reference to the removed object. The problem I'm facing is how to reinsert it in the DB keeping all references intact?

Problems:
- there are uninitialized collections in the removed object and it gets detached when removed.
- there are other objects which get removed along with the root object (cascade=ALL)
- cloning is not a solution because I can have a chain of RemoveCommand(s) removing objects which refer to each other.

Any advice is highly appreciated.

Best regards,
cdan.


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.