Upsert: clarify upsert along nullable single-valued navigation path

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

      Applied

    • 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.
    • Show
      https://www.oasis-open.org/committees/download.php/64119/odata-v4.01-wd06-part1-protocol-2018-10-19.docx  

      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.

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

              Created:
              Updated:
              Resolved: