Child not updating

Child not updating

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


Pieterv posted on Monday, July 16, 2007

Hi Everyone,

I'm a bit stumped at the moment. I have a parent object Order and a child object Lines.
When I change a line and save the parent object , the line does not get updated.

If however I change the parent Object(Order) and then make a change to the line object and then save the parent object, the changes to the child object does get saved.

How do I force the parent object to save the children and/or how do I detect if a child object has changed?

Thanks!

JoeFallon1 replied on Monday, July 16, 2007

In your Parent Object you have to override IsValid and IsDirty to include the child collections.

Joe

 

Pieterv replied on Tuesday, July 17, 2007

    Thanks Joe!

    Works like a charm.

Copyright (c) Marimer LLC