Menu

CascadeDeleteObjectGraph logic question

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

    James - 2006-09-21

    Hi!

    Question on CascadeDeleteObjectGraph method:

    Is this code assumption correct:
    level1.ClsLevel2[1].Delete() causes level1 to be deleted? Why?

    My understanding is that only level1.ClsLevel2[1] (and its descendants in graph) should be deleted.

    Thanks.

     
    • Richard Beauchamp

      Hi James,

      Because you set CascadeDelete="true" on the ReferenceDescriptor 'Level2_ReferenceTo_Level1'. So when you delete an instance of level2, it will delete the instance of level1 that it references.

      Does that make sense,

      Richard

       

Log in to post a comment.