on 04-05-2018 8:22 AM
I have an odata query which I believe to be valid, which is receiving an error from my Neo XS runtime. It includes a nested $expand:
?$expand=expenseitem($expand=currency,expenseType,paymentType)&$top=20
The resultant error shows that the parenthesis are not being respected:
"Syntax error in $expand system query option at position '28': entityNavProperty 'expenseitem($expand=currency' is not a valid navigation property for type 'codejam.saptravelexpense.services.expenseReportType'."<br>
Queried independently, $expand=expenseitem on the principal expensereport, and $expand=currency,expenseType,paymentType on the principal expenseitem behave as expected.
Any guidance here?
HANA Workbench v1.120.20.
From what I’m reading online and in the OData specification this would seem to be a new syntax feature of OData V4. XSODATA is V2.
Here is the entire specification for $expand in OData V2:
http://www.odata.org/documentation/odata-version-2-0/uri-conventions/
ere is the same section in OData V4:
Note the section above about query options that can be applied to the expanded navigation.
Query options can be applied to the expanded navigation property by appending a semicolon-separated list of query options, enclosed in parentheses, to the navigation property name. Allowed system query options are $filter, $select, $orderby, $skip, $top, $count, $search, and $expand.
This is also listed in the What’s New features of OData V4:
http://docs.oasis-open.org/odata/new-in-odata/v4.0/cn01/new-in-odata-v4.0-cn01.html#_Toc366145452
Expanded entities can now be filtered, ordered, paged, projected, cast, … , and of course further expanded through a more composable, nested syntax.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.