-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major
-
Affects Version/s: V4.0_CSD03
-
Component/s: Data Aggregation
-
None
-
Environment:
Applied
Section 7.1 defines the result of grouping by a single-valued navigation property without giving an example.
Any example in this section that groups by the key property of a related entity could be rephrased to group by the navigation property instead. Here's how example 52 would look like:
GET ~Sales?$apply=groupby((Customer,Product))
and results in
{
"@odata.context": "$metadata#Sales(Customer,Product)",
"value": [
{ "@odata.id": null, "Customer": { "@odata.id": "Customers('C1')" }, "Product": { "@odata.id": "Products('P2')" } },
{ "@odata.id": null, "Customer": { "@odata.id": "Customers('C1')" }, "Product": { "@odata.id": "Products('P3')" } },
{ "@odata.id": null, "Customer": { "@odata.id": "Customers('C1')" }, "Product": { "@odata.id": "Products('P1')" } },
{ "@odata.id": null, "Customer": { "@odata.id": "Customers('C2')" }, "Product": { "@odata.id": "Products('P2')" } },
{ "@odata.id": null, "Customer": { "@odata.id": "Customers('C2')" }, "Product": { "@odata.id": "Products('P3')" } },
{ "@odata.id": null, "Customer": { "@odata.id": "Customers('C3')" }, "Product": { "@odata.id": "Products('P3')" } },
{ "@odata.id": null, "Customer": { "@odata.id": "Customers('C3')" }, "Product": { "@odata.id": "Products('P1')" } }
]
}