Clarify insert entity defined only by key properties of related entities

    • 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.
    • 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  

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

            Assignee:
            Unassigned
            Reporter:
            Hubert Heijkers (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: