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] Created: (ODATA-414) Fix syntax for deleting links to support containment

Fix syntax for deleting links to support containment

                 Key: ODATA-414
                 URL: http://tools.oasis-open.org/issues/browse/ODATA-414
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: Bug
          Components: OData ABNF Construction Rules, OData Protocol , OData URL Conventions 
    Affects Versions: V4.0_CSD01
         Environment: [Proposed]
            Reporter: Michael Pizzo
             Fix For: V4.0_CSD02

Today the syntax for deleting a link from Products(5) to the orderdetail whose id is 1  is as follows:

DELETE ~Products(5)/OrderedIn(1)/$ref

We did this as a shortcut to repeating the collection and id following the $ref.

There are two problems with this syntax. First, it is semantically a bit weird in that Products(5)/OrderedIn/$ref represents the set of entity references of order details referenced by the OrderedIn nav prop of Products(5). More significantly, it doesn't work for containment scenarios, or anywhere there is no navigationpropertybinding, as the key appended to the nav property is not guaranteed to uniquely identify the related entity.

The second problem is a manifestation of the first conceptual problem. In order to delete a relationship we need 3 pieces of information: (1) the source entity, (2) the navigation property, and (3) the id of the thing being no longer related. In a 1:1 or many:1 relationship the id of the thing being removed is implicit, but in many:many we need to specify which thing to unrelated. The current syntax assumes that this information can be derived by applying the key to the nav prop, but this alone is not sufficient.

For collections, we could append id to the URL representing the collection of links, as in:
   DELETE ~Products(5)/OrderedIn/$ref/OrderDetails(1)
for non-contained OrderDetails, or:
   DELETE ~Products(5)/OrderedIn/$ref/Orders(123)/Details(1)
for contained OrderDetails

For single-valued relationships we would simply omit the id, since it points to a single references (and is therefore not valid to index with an id)

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]