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

Support Delta responses for Singletons

    XMLWordPrintable

    Details

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

      Applied

    • Proposal:
      Hide

      Deltas can be supported for singletons and single-value navigation properties as well as entities and collection-valued navigation properties.

      The context url for a delta against a singleton (or single-valued nav prop) follows the same pattern of appending /$delta to the context url returned by a request against that singleton (or single-valued nav prop).

      The 4.01 JSON payload for a delta request/response rooted in a single object is the single object with nested changes (i.e., propertyName@delta).

      We don't define a 4.0 JSON format for a delta payload for a request/response rooted in a single object.

      Show
      Deltas can be supported for singletons and single-value navigation properties as well as entities and collection-valued navigation properties. The context url for a delta against a singleton (or single-valued nav prop) follows the same pattern of appending /$delta to the context url returned by a request against that singleton (or single-valued nav prop). The 4.01 JSON payload for a delta request/response rooted in a single object is the single object with nested changes (i.e., propertyName@delta). We don't define a 4.0 JSON format for a delta payload for a request/response rooted in a single object.
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/64119/odata-v4.01-wd06-part1-protocol-2018-10-19.docx https://www.oasis-open.org/committees/download.php/64120/odata-json-format-v4.01-wd06-2018-10-19.docx  

      Description

      Today we are a bit unclear about whether or not deltas are supported for singletons.

      In 11.3 Requesting Changes of the Protocol document, we say:
      "Any GET request to retrieve one or more entities MAY allow change-tracking."

      However, in 15.1 Delta Response of the JSON document we say:
      "Responses from a delta request are returned as a JSON object. The JSON object MUST contain an array-valued property named value containing all added, changed, or deleted entities, as well as added links or deleted links between entities, and MAY contain additional, unchanged entities."

      The wording from the JSON spec makes sense for 4.0, since changes to related entities and links were represented in a flattened result, but with the ability to represent nested related content, it is useful to support a delta payload (GET or PATCH) for requests anchored on a single node.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: