OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Updated: (ODATA-173) Define Action values for OnDelete element


     [ http://tools.oasis-open.org/issues/browse/ODATA-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ralf Handl updated ODATA-173:
-----------------------------

        Summary: Define Action values for OnDelete element  (was: Remove OnDelete element)
       Proposal: 
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.

  was:Remove OnDelete element

    Environment: [Proposed]
    Description: 
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.

  was:
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 and not really useful for the client; using deltas is a better way to keep a local copy of data in sync with the server.


Regarding the part in upper case letters consider the following example:

A company (key: CompanyID) has multiple cost centers (keys: CompanyID, CostCenterID); each cost center has multiple cost records (keys: CompanyID, CostCenterID, CostRecordID. 
Referential constraint from cost record to cost center for CompanyID, CostCenterID, on delete set null.
Referential constraint from cost record to company for CompanyID, undefined action on delete.

If a cost center is deleted, the CostCenterID is set to null, the CompanyID remains unaffected: the costs for the company are real and for that company, even if it is (temporarily) undefined which cost center has spent the money.

> Define Action values for OnDelete element
> -----------------------------------------
>
>                 Key: ODATA-173
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-173
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData CSDL v1.0
>    Affects Versions: WD01
>         Environment: [Proposed]
>            Reporter: Ralf Handl
>            Priority: Minor
>             Fix For: WD01
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]