You can implement ContactData in two ways
Nothing forces you to use UpdateChildren() – it is a
helper method to make things simpler, but it is not required.
Your parent object could just do this:
Protected Overrides Sub DataPortal_Insert()
Using …ConnectionManager…
DataPortal.UpdateChild<ContactData>(ReadProperty(ContactDataProperty))
‘ repeat for each child
End Using
End Sub
That’s all UpdateChildren() does – simply loops
through all your child fields and calls the data portal. If you do it manually,
it is a little more work, but then you control the order of processing.
Rocky
From: stefan
[mailto:cslanet@lhotka.net]
Sent: Wednesday, September 24, 2008 7:08 AM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] How to synchronize the edit level for a private
BusinessBase derived child object?
Thanks for your suggestions.
I would like to implement it following alternative 2.
But, my Contactdata needs to be updated (inserted) prior to anything else
(providing the primary key),
so I cannot call FieldManager.UpdateChildren (which I do for the remaining
child objects).
Is there a way to exclude a specific child from the UpdateChildren process,
or can we interfere somehow manually?
Stefan
Copyright (c) Marimer LLC