Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-1141

Upsert: clarify upsert along nullable single-valued navigation path

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.01_CS01
    • Fix Version/s: V4.01_CS02
    • Component/s: Protocol
    • Labels:
      None
    • Environment:

      Applied

    • Proposal:
      Hide

      PUT or PATCH to a single-valued navigation property reference (i.e., customers/salesperson/$ref) MUST only include the entity id, and changes which entity is referenced by the navigation property.

      PUT or PATCH to a single-valued navigation property (i.e., customers/salesperson) performs an update on the currently related resource. If the value of the navigation property is non-null then any key values are ignored and the referenced entity is updated. If the value of the navigation property is null, for a containment relationship a resource is created (since the single-valued navigation path identifies the resource). For a non-containment relationship, PUT or PATCH to a null single-valued navigation property returns an error.

      The same semantics apply to singletons on the entity container, which are semantically contained single value navigation properties.

      Show
      PUT or PATCH to a single-valued navigation property reference (i.e., customers/salesperson/$ref) MUST only include the entity id, and changes which entity is referenced by the navigation property. PUT or PATCH to a single-valued navigation property (i.e., customers/salesperson) performs an update on the currently related resource. If the value of the navigation property is non-null then any key values are ignored and the referenced entity is updated. If the value of the navigation property is null, for a containment relationship a resource is created (since the single-valued navigation path identifies the resource). For a non-containment relationship, PUT or PATCH to a null single-valued navigation property returns an error. The same semantics apply to singletons on the entity container, which are semantically contained single value navigation properties.
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/64119/odata-v4.01-wd06-part1-protocol-2018-10-19.docx  

      Description

      Section 11.4.4 Upsert an Entity allows upsert request to any URL that identifies a single entity. It then references section 11.4.2 Create an Entity, which only talks about creating entities in a collection.

      This question also arises in the context of "deep update" with nested entities for single-valued navigation.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              handl Ralf Handl
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: