-->
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: Merge two graphs of objects
PostPosted: Thu Oct 19, 2006 8:43 am 
Newbie

Joined: Sun Nov 27, 2005 2:31 pm
Posts: 12
Location: Dublin
Hi,

Is it an easy way of merging 2 graphs of objects?
The graphs have the same structure but different values.
I want to replace values from graph 1 with values from graph 2.

Any ideas?

thanks

_________________
Pawel Pabich


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 19, 2006 2:13 pm 
Newbie

Joined: Wed Sep 20, 2006 5:03 pm
Posts: 10
I don't know of any built-in facility in NHibernate, but if you are using .NET 2.0, you can write an iterator that iterates that graph. Then, implement a copy method to copy from one to another, using your iterator to iterate via a foreach. Or, if you don't mind mixing implemenetation with your data objects, you can implement copy c-tors on them that will copy the state of one instance into the new instance.

HTH,

Timex

_________________
Timex


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.