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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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