Same references with in an object graph

Same references with in an object graph

Old forum URL: forums.lhotka.net/forums/t/5819.aspx


Oob posted on Monday, November 17, 2008

Here is the sample of the object graph I am working on. Notice that "Object A" and "Object B" hold the same child object. For this object graph, the parent object can modify the child object and if 2 different parents have the same child object, it needs to be the same reference.

Object Collection
--Object A
----Child Object 1
--Object B
----Child Object 1
--Object C
----Child Object 2

My issues is with saving. Since 3.5 causes the save process to create a clone of the object at same time, this hierarchy will cause "Object 1" to be saved twice(i think) and "Object A" and "Object B" to have two new and different references. I am looking to anyone that has any ideas how to work through this issues.

I am aware that my object graph could be wrong, however at the moment it is the best solution to the problem that I need to solve. 

Thank you for any input.
Tony

Copyright (c) Marimer LLC