MarkAsChild and ReadOnlyBase child objects.

MarkAsChild and ReadOnlyBase child objects.

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


tarekahf posted on Tuesday, April 24, 2012

I wanted to create a Child ReadOnlyBase, and I was checking template (.NET 2.0), "ReadOnlyChild.vb" and I did not find "MarkAsChild()".

Does this mean that for Readonly Child Object, there is no need to mark the object as child?

What is the purpose of marking child objects as "child"?

Tarek.

JonnyBee replied on Tuesday, April 24, 2012

MarkAsChild is only valid for EditableObjects and will make the object block Save() method.

IE: If you call Save on an object that is MarkedAsChiild it will throw exception.
     Child editable lists will only accept objects that are marked with MarkAsChild.

Copyright (c) Marimer LLC