ChildUpdate order..

idroesse posted on Tuesday, July 13, 2010

Hi guys, just a question. When I save a Parent Object, FieldManager.UpdateChildren is used to save every children, what is the saving order? Let me explain...

Parent Object

------ Child 1

------ Child 2

Saving order is Parent, Child 1 and then Child 2 (using alphabetical order I suppose). Is it possibile to change this sequence in order to save Parent, Child 2 and then Child 1 (without renaming Child 2 in Child 1)?

Thanks a lot

Enrico

Marjon1 replied on Tuesday, July 13, 2010

You cannot guarantee the order in which child objects are updated, unless you manually call each DataPortal.UpdateChild in the sequence required. If the only importance that Child2 was done first you could then do FieldManager.UpdateChildren for it to do the remaining objects.

I'm going off memory with the code example below, apologies for any mistakes.