I'm wondering if DomainObjects framework is capable of handling the situation like this:
1. there is an object Obj1 that holds list of objects Obj2;
2. one of list elements is being modified (e.g. iObj1.ListObj2[0].SomeProperty = "some new value")
Is there any way to do "save" on iObj1 and persist all the modified hierarchy of objects below iObj1?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I'm wondering if DomainObjects framework is capable of handling the situation like this:
1. there is an object Obj1 that holds list of objects Obj2;
2. one of list elements is being modified (e.g. iObj1.ListObj2[0].SomeProperty = "some new value")
Is there any way to do "save" on iObj1 and persist all the modified hierarchy of objects below iObj1?
Thanks!
Hi James,
Yes. In the CollectionDescriptor for 'ListObj2' set the attribute 'CascadeStore=true'.
See the DomainObjects unit test CascadeStoreCollectionModifiedOutsideContextOfTransaction() for an example of this.
Regards,
Richard