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-490) Clarify Referential Constraints have UpdateRule=Cascade semantics


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

Ralf Handl updated ODATA-490:
-----------------------------

    Proposal: 
Clarify that:
1. Dependent properties that rely on non-key principle properties are ignored on update.
2. Updating a dependent property that relies on key principle properties effectively updates the relationship as long as a related entity with the specified key value(s) exists; otherwise the update fails.
3. If both a bind operation and a property value dependent upon a key of the principle of the same navigation are specified in an update payload, the bind operation "wins" and the dependent property is ignored.
4. Changes to non-key principle properties "cascade" to all dependent entities
5. If a nav prop is null, then the dependent property is null 
6. Having a nullable nav prop implies the dependent property is nullable. It is an error if it is declared as nullable="false"
7. Having a non-nullable nav prop with a non-nullable principle property requires that the corresponding dependent property is defined with nullable="false" 
8. For purposes of PUT, the default value for dependent properties is the value of the principle property (i.e., they don't get reset). Make sure it's clear that all dependent properties are defaulted to properties of the principle on POST.

Accepted: https://www.oasis-open.org/committees/download.php/50877/odata-meeting-54_on-20131001-minutes.html#odata-490

  was:
Clarify that:
1. Dependent properties that rely on non-key principle properties are ignored on update.
2. Updating a dependent property that relies on key principle properties effectively updates the relationship as long as a related entity with the specified key value(s) exists; otherwise the update fails.
3. If both a bind operation and a property value dependent upon a key of the principle of the same navigation are specified in an update payload, the bind operation "wins" and the dependent property is ignored.
4. Changes to non-key principle properties "cascade" to all dependent entities
5. If a nav prop is null, then the dependent property is null 
6. Having a nullable nav prop implies the dependent property is nullable. It is an error if it is declared as nullable="false"
7. Having a non-nullable nav prop with a non-nullable principle property requires that the corresponding dependent property is defined with nullable="false" 
8. For purposes of PUT, the default value for dependent properties is the value of the principle property (i.e., they don't get reset). Make sure it's clear that all dependent properties are defaulted to properties of the principle on POST.


> Clarify Referential Constraints have UpdateRule=Cascade semantics
> -----------------------------------------------------------------
>
>                 Key: ODATA-490
>                 URL: http://tools.oasis-open.org/issues/browse/ODATA-490
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: Improvement
>          Components: OData Protocol 
>    Affects Versions: V4.0_CS01
>         Environment: [Proposed]
>            Reporter: Michael Pizzo
>             Fix For: V4.0_CSD03
>
>
> The current specification defines referential constraints that specify properties of the dependent entity must be the same as the corresponding properties of the principle entity. This is similar to a foreign key in a database which specifies that the property of a dependent row must match the (typically primary key) properties of a row in the principle table. Foreign keys in a database are defined through Referential Constraints which have a DeleteRule and an UpdateRule that specify what happens to dependent rows when the principle row is deleted or updated.
> In OData, the referential constraint implicitly includes the navigation property which enforces the uniqueness constraint required in relational databases. This allows us to define referential constraints on sets of properties that may not be unique outside of the implicitly added to 0..1 navigation property.
> In OData we also define an OnDelete rule that specifies what happens if the principle entity is deleted. However, we don't define an UpdateRule. We also don't say what happens if the client tries to update a dependent property (which would be an error if they didn't at the same time change the navigation property to point to a principle entity with the same value).
> The reasonable behavior would be for updates to the dependent properties to be ignored by the service and for updates to the referenced property in the primary entity to "cascade" to the dependent entities. This fits well with the denormalization scenario we were trying to support in allowing the referential constraint to support non-key properties. We even imply this strongly in the insert case by saying that dependent properties may be omitted and must be ignored by the service in inserting a new entity, we just are not as clear in the updating section, when we talk about omitting "key and non-updatable properties" that this includes dependent properties defined within a referential constraint.

-- 
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]