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

Additional representation of entity references using (alternate) key properties

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: V4.01_OS
    • Fix Version/s: None
    • Component/s: JSON Format
    • Labels:
      None
    • Proposal:
      Hide

      Allow entity references to contain all key fields instead of @id.

      Show
      Allow entity references to contain all key fields instead of @id .

      Description

      Entity references are currently represented as a JSON object containing an @id member, e.g.

      {
        "@context": "https://foo/bar/$metadata#$ref",
        "@id": "Orders(10643)"
      }
      

      An easier-to-create and also easier-to-digest representation would be to include instead all properties from either the primary key or one of the declared alternate keys):

      {
        "@context": "https://foo/bar/$metadata#Orders(quux)/$entity",
        "quux": 10643
      }
      

      This is similar to the V4.01 format for deleted entities in delta payloads. If properties other than the key properties are supplied, these are ignored - a reference is not an implicit update.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: