Affects Version/s: V4.0_CSD01
Fix Version/s: V4.0_CSD02
Component/s: CSDL XML
Place OnDelete on principal side to allow expressing existential dependency in containment without needing a backlink to the containing type, see
Resolution:https://www.oasis-open.org/committees/download.php/49407/odata-v4.0-wd02-part3-csdl-2013-06-04.docx https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/schemas/edm.xsd?rev=333 Accepted: https://www.oasis-open.org/committees/download.php/49557/odata-meeting-41_on-20130613_14-F2F-minutes.html#odata-411
Currently the OnDelete element is on the dependent side and specifies "what happens here if over there the last thing goes away", i.e. an observer/event subscription pattern. This may have been inspired by SQL's ON DELETE, which is also specified on the dependent side.
The "original" OnDelete element of OData V2/V3 seems to be specified on the principal side of the association, unfortunately not explicitly stated, only deducible from the only given example:
<End Type="Self.CProduct" Multiplicity="*" />
<End Type="Self.CCategory" Multiplicity="0..1">
<OnDelete Action="Cascade" />
If the category goes away, it notifies its products to also go away.