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: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: V4.01_CS02
    • Fix Version/s: V4.02_WD01
    • Component/s: JSON Format
    • Labels:
      None
    • Environment:

      Proposed

    • 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": "$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": "$metadata#$ref",
        "OrderID": 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:
              1 Start watching this issue

              Dates

              • Created:
                Updated: