Details

    • Proposal:
      Hide

      JSON Format

      Transport the ETag for a collection-valued navigation property in its containing entity as control information on the navigation property:

      {
        "@context": "http://host/service/$metadata#Orders/$entity",
        "@id": "Orders(1234)",
        "@etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
        "ID": 1234,
        "Items@etag": "W/\"MjAxOS0wMy0xMlQxMDoyMlo=\""
      }
      

      Note: the collection ETag for a navigation property may or may not be identical to the ETag of the container entity, the example shows a different ETag for the Orders collection.

      Services MAY include these, just as they MAY include the entity @etag control information. Up to the server when to do it. based e.g. on computational complexity.

      Annotate Navigation Properties

      Extend type Capabilities.NavigationPropertyRestriction with property OptimisticConcurrencyControl of type Edm.Boolean, default value false.

      Note: this differs from the existing term Core.OptimisticConcurrency which is a collection of property paths, using an empty collection for "tagging" without revealing which properties influence the calculated ETag.

      Protocol

      Add POST to the list of methods in sections 8.2.4 Header If-Match and 8.2.5 Header If-None-Match.

      Mention collection ETags in section 11.4.1.1 Use of ETags for Avoiding Update Conflicts.

      Show
      JSON Format Transport the ETag for a collection-valued navigation property in its containing entity as control information on the navigation property: { "@context" : "http: //host/service/$metadata#Orders/$entity" , "@id" : "Orders(1234)" , "@etag" : "W/\" MjAxMy0wNS0yN1QxMTo1OFo=\"", "ID" : 1234, "Items@etag" : "W/\" MjAxOS0wMy0xMlQxMDoyMlo=\"" } Note: the collection ETag for a navigation property may or may not be identical to the ETag of the container entity, the example shows a different ETag for the Orders collection. Services MAY include these, just as they MAY include the entity @etag control information. Up to the server when to do it. based e.g. on computational complexity. Annotate Navigation Properties Extend type Capabilities.NavigationPropertyRestriction with property OptimisticConcurrencyControl of type Edm.Boolean , default value false . Note: this differs from the existing term Core.OptimisticConcurrency which is a collection of property paths, using an empty collection for "tagging" without revealing which properties influence the calculated ETag. Protocol Add POST to the list of methods in sections 8.2.4 Header If-Match and 8.2.5 Header If-None-Match. Mention collection ETags in section 11.4.1.1 Use of ETags for Avoiding Update Conflicts.
    • Resolution:
      Show
      https://github.com/oasis-tcs/odata-vocabularies/pull/43/files https://www.oasis-open.org/committees/download.php/64925/odata-json-format-v4.01-wd06-2019-03-15.docx https://www.oasis-open.org/committees/download.php/64927/odata-v4.01-wd06-part1-protocol-2019-03-21a.docx    

      Description

      With ODATA-981 we clarified that collections can also have ETags and clients must specify if-match when posting to the collection.

      What's missing is

      • an annotation in $metadata to tell clients up-front which collections, especially collection-valued navigation properties, use optimistic concurrency control
      • a way to transport ETags for collection-valued navigation properties in responses to the "container" entity

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: