Define Action values for OnDelete element

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Minor
    • V4.0_WD01
    • Affects Version/s: V4.0_WD01
    • Component/s: CSDL XML
    • None
    • Environment:

      [Proposed]

    • Hide

      Rephrase the second paragraph of section 7.3.8 The edm:OnDelete Element:

      If present, the edm:OnDelete element MUST define a value for the Action attribute. The value assigned to the action attribute MUST be

      • Cascade, meaning the dependent entities will be deleted if the principal entity is deleted,
      • None, meaning a DELETE operation on a principal entity with dependent entities will fail,
      • SetNull,meaning all dependent properties THAT DO NOT PARTICIPATE IN OTHER REFERENTIAL CONSTRAINTS will be set to null,
      • SetDefault,meaning all dependent properties THAT DO NOT PARTICIPATE IN OTHER REFERENTIAL CONSTRAINTS will be set to their default value.

      If no edm:OnDelete element is present, the action taken by the service is not predictable by the client and may vary per entity.

      Accepted: https://www.oasis-open.org/committees/download.php/48411/odata-meeting-27_on-20130228-minutes.html#odata-172

      Show
      Rephrase the second paragraph of section 7.3.8 The edm:OnDelete Element: If present, the edm:OnDelete element MUST define a value for the Action attribute. The value assigned to the action attribute MUST be Cascade, meaning the dependent entities will be deleted if the principal entity is deleted, None, meaning a DELETE operation on a principal entity with dependent entities will fail, SetNull,meaning all dependent properties THAT DO NOT PARTICIPATE IN OTHER REFERENTIAL CONSTRAINTS will be set to null, SetDefault,meaning all dependent properties THAT DO NOT PARTICIPATE IN OTHER REFERENTIAL CONSTRAINTS will be set to their default value. If no edm:OnDelete element is present, the action taken by the service is not predictable by the client and may vary per entity. Accepted: https://www.oasis-open.org/committees/download.php/48411/odata-meeting-27_on-20130228-minutes.html#odata-172
    • Show
      https://www.oasis-open.org/committees/download.php/48440/odata-core-v4.0-wd01-part3-csdl-2013-03-05-RH.doc https://tools.oasis-open.org/version-control/browse/wsvn/odata/trunk/spec/schemas/edm.xsd?rev=206 Accepted: https://www.oasis-open.org/committees/download.php/48549/odata-meeting-29_on-20130314-minutes.html#odata-173

      The OnDelete element allows the server telling the client which action it will take on the current entity when a "leading" entity is deleted. Allowed action values are "Cascade" and "None".

      This list of actions is incomplete, the full list of ON DELETE values in standard SQL is

      • NO ACTION
      • CASCADE
      • SET NULL

      TSQL in addition defines the value

      • SET DEFAULT

      The latter would also make sense in the CSDL context as a property can have a default value.

            Assignee:
            handl
            Reporter:
            handl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: