Yes... We have a scenarion where I fetch all of my objects from a database server and serialize them to a file. This file is then moved to a disconnected machine that has a blank version of the database on it. I then deserialize the file and save all of our objects to the blank database.
My issue is that I can force the parent to be dirty, but when I loop through my child collection the IsDirty flag is clean since I haven't changed any data. This means all of my parent objects make it into the database, but no kids/grandkids.
Hope that made sense. The biggest issue is that we had an incomplete scope of the software and we are trying to make due with the design we have until we can get some time. :(
I appreciate the response and any further help.
In cases where I have had to to this I took the route of creating an internally scoped method on the child class that simply calls MarkDirty(). Your parent then has the ability to loop through the children and invoke the method as needed. (In your scenario the child would have to do the same thing for its children etc etc.)
Maybe not particularly elegant, but it got the job done.
-- Fintan
That’s what I was going to recommend J
Rocky
From: Fintanv
[mailto:cslanet@lhotka.net]
Sent: Monday, April 21, 2008 10:03 AM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] ForceUpdate on a child object?
In cases where I have had to to this I took the route of creating an
internally scoped method on the child class that simply calles
MarkDirty(). Your parent then has the ability to loop through the
children and invoke the method as needed. (In your scenario the child
would have to do the same thing for its children etc etc.)
Maybe not particularly elegant, but it got the job done.
-- Fintan
Thank for the responses from both of you.
That seems to be a perfect solution to my issue.
Copyright (c) Marimer LLC