Menu

Objects hierarchy persistence?

James
2006-09-04
2013-04-22
  • James

    James - 2006-09-04

    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!

     
    • Richard Beauchamp

      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

       

Log in to post a comment.