Quantcast
Channel: CSLA .NET
Viewing all articles
Browse latest Browse all 764

Issue Cloning Child List

$
0
0

Hello, I'm trying to make a copy of a BO using the method that Rocky talked about in another post. My object graft looks something like this. I'm using CSLA 4.3.

parent

      single child

      single child

            child list

            child list

      single child

             child list

             child list

I have a static method on the parent object that accepts the "copy from" Id. 

Object from = GetObject(id);

Object newObject = from.Clone();

newObject.MarkNew()

newObject.Id = Guid.NewGuid();

newObject.Child.FixUpAfterCopy();

...

So the single child objects are cloning correctly but the child list objects of the single child objects are not cloning all the time. If I but a break point in the "FixUpAfterCopy()" of the child then it copies. Could it be the lazy loading of the child list? Any other suggestions?

Thanks,

 

 


Viewing all articles
Browse latest Browse all 764

Trending Articles