We have an object tree like:
Code:
C
/
A–B-D
\
C
Apart from being able to persist A and associated composite child objects (B C and D) we also would like to be able to take a copy of B to produce something like:
Code:
C
/
A–B-D
|\
| C
|
| C
| /
\–B’-D’
It seems feasible to load our persisted information about B and its composite children into a copy. However we want to create a copy of B (B’) such that some of the composite child objects are copied but others, C, are not. That is all instance of C are the same.
In section 9.11 nHibernate documentation suggests that a selective deep copy might be available using IClassMetadata.
Any suggestions or experiences?