OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-971) 7.1: Add example for grouping by single-valued navigation property


Ralf Handl created ODATA-971:
--------------------------------

             Summary: 7.1: Add example for grouping by single-valued navigation property
                 Key: ODATA-971
                 URL: https://issues.oasis-open.org/browse/ODATA-971
             Project: OASIS Open Data Protocol (OData) TC
          Issue Type: Improvement
          Components: OData Extension for Data Aggregation
    Affects Versions: V4.0_CSD03
         Environment: Proposed
            Reporter: Ralf Handl
             Fix For: V4.0_CSD04


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(Name,ID),Product(Name))",
  "value": [
    { "@odata.id": null,
      "Customer@odata.navigationLink": "Customers('C1')",
      "Product@odata.navigationLink":  "Products('P2')" },
    { "@odata.id": null,
      "Customer@odata.navigationLink": "Customers('C1')",
      "Product@odata.navigationLink":  "Products('P3')" },
    { "@odata.id": null,
      "Customer@odata.navigationLink": "Customers('C1')", 
      "Product@odata.navigationLink":  "Products('P1')"},
    { "@odata.id": null,
      "Customer@odata.navigationLink": "Customers('C2')", 
      "Product@odata.navigationLink":  "Products('P2')" },
    { "@odata.id": null,
      "Customer@odata.navigationLink": "Customers('C2')", 
      "Product@odata.navigationLink":  "Products('P3')" },
    { "@odata.id": null,
      "Customer@odata.navigationLink": "Customers('C3')", 
      "Product@odata.navigationLink":  "Products('P3')"} },
    { "@odata.id": null,
      "Customer@odata.navigationLink": "Customers('C3')", 
      "Product@odata.navigationLink":  "Products('P1')" }
  ]
}



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]