-->
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: Copying object graphs
PostPosted: Tue Sep 16, 2003 3:42 pm 
Beginner
Beginner

Joined: Fri Sep 12, 2003 12:54 pm
Posts: 20
Hi all,

I'm looking for the best (read: most perfomant) way to create a copy of an object graph. For instance, say I have an object A, that has a reference to a B and a C, and it also has a collection of Ds, and Ds have references to Es.

How can I get a copy of all of the database records, but all with new ids. ? In otherwords, a deep clone - the new instance of A should point to a new B, a new C, and a new collection should be created of new Ds with new Es. All records should be identical, but with new Ids.

thanks,
james


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 16, 2003 3:47 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
You can write an efficient deep copy algorithm on top of the metadata API.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 09, 2003 8:09 pm 
Beginner
Beginner

Joined: Sat Aug 30, 2003 1:36 am
Posts: 47
Location: Calgary, AB
jhouse, you figure out an easy way to do this?


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.