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

Fix issues with entity references and rationalize with $links

    XMLWordPrintable

    Details

      Description

      In adding Entity References in OData-199, we introduced a few issues.

      First, we said that clients could return just references, in place of the actual entity, by putting $ref in the select clause. We then said it wasn't valid to include navigation properties with $ref in the select, but not other non-navigation properties. This is a bit arbitrary; the only data that needs to be returned an object is its references to other object(s); if links from those related objects are also of interest, they can be requested and retrieved as related links of those objects. Also, it's a bit strange to use $select for something that changes the type of object returned, from an entity to an entity reference; a path expression would be more suitable for this.

      Second, adding a path representation for relationships gives us a way to rationalize/generalize the special semantics around $links that we have today. We can use the $ref path expression to refer to the links that are added/deleted/enumerated, and provide a consistent representation of an entity reference in the payload (rather than have entity references for referring to entities in one case, and a separate URI construct for referring to entities in another case).

        Attachments

          Activity

            People

            • Assignee:
              handl Ralf Handl
              Reporter:
              mikep Michael Pizzo (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: