-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: V4.0_WD01
-
Fix Version/s: V4.0_WD01
-
Component/s: ABNF, ATOM Format, JSON Format, Protocol, URL Conventions
-
Labels:None
-
Environment:
[Proposed]
-
Proposal:
-
Resolution:
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).