Skip to content

Commit 7823796

Browse files
authored
Update collections.md
1 parent 2a0091f commit 7823796

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

graph/articles/collections.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,31 @@ The model can be updated to simply switch the complex type for an entity type:
431431
-</ComplexType>
432432
+</EntityType>
433433
```
434+
To maintain backwards compatibility **and** compliance with the OData standard, there are several semantic changes that the workload must address:
435+
1. Existing clients would have been able to `$select` the `bars` property.
436+
Now that `bars` is a navigation property, the [OData standard](https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#_Toc31361040) specifies that its navigation link be returned when it is `$selected`:
434437

438+
> If the select item is a navigation property, then the corresponding navigation link is represented in the response.
435439
440+
Because the previous behavior for `$select=bars` was to include the collection in the response, and because the standard dictates that the navigation link be included in the response, the new behavior is to include both:
441+
442+
```http
443+
GET /foos/{fooId}?$select=bars
444+
```
445+
```http
446+
200 OK
447+
{
448+
"id": "{fooId}",
449+
"bars": [
450+
{
451+
"prop1": "some value",
452+
"prop2": "another value"
453+
},
454+
...
455+
]
456+
"[email protected]": "/foos('{fooId}')/bars"
457+
}
458+
```
436459

437460

438461

0 commit comments

Comments
 (0)