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

Clarify insert entity defined only by key properties of related entities

    XMLWordPrintable

    Details

    • Proposal:
      Hide

      The key of an entity may include all key properties of a directly related entity if the relationship is single-valued and not nullable. In this case PropertyRefs for all key properties of the related entity have to be specified with an alias. Order need not be the same as in the referenced entity type. This makes the navigation property immutable.

      Specify the related entity as an entity reference, i.e. in JSON Format as a JSON object just containing the @odata.id:

      {
        "RelatedThing": {
          "@id": "Thing(10835)"
        },
        "NonKeyPropertyToInsert": "Inserted Value",
        ...
      }
      

      Add the corresponding CSDL snippet for clarity.

      Show
      The key of an entity may include all key properties of a directly related entity if the relationship is single-valued and not nullable. In this case PropertyRefs for all key properties of the related entity have to be specified with an alias. Order need not be the same as in the referenced entity type. This makes the navigation property immutable. Specify the related entity as an entity reference, i.e. in JSON Format as a JSON object just containing the @odata.id : { "RelatedThing" : { "@id" : "Thing(10835)" }, "NonKeyPropertyToInsert" : "Inserted Value" , ... } Add the corresponding CSDL snippet for clarity.
    • Resolution:
      Show
      https://www.oasis-open.org/committees/download.php/64681/odata-v4.01-wd06-part1-protocol-2019-02-08.docx https://www.oasis-open.org/committees/download.php/64683/odata-csdl-json-v4.01-wd05-2019-02-08.docx https://www.oasis-open.org/committees/download.php/64684/odata-csdl-xml-v4.01-wd06-2019-02-08.docx  

      Description

      Clarify how to specify key properties that are defined as properties of referenced entities.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              hubert.heijkers Hubert Heijkers (Inactive)
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: