11-20-2016 10:33 AM - edited 02-03-2024 5:06 PM
I'm using XS Advanced (SAP HANA SPS12) to develop an application with SAPUI5 and Node.js. I'm exposing my CDS Views as OData with a .xsodata file.
I've created the Associations and the Navigations for the OData entity. Almost everything is working pretty fine. I can load the OData service in my UI5 model and bind the properties.
The problem is I cannot use OData parameter $expand! If I bind the element using the full path it works, if I use $expand, it doesn't work!
With full path: returns status 200 (OK)
https://myhost/services.xsodata/Entities('key')/navToAnotherEntity
With $expand: returns status 500 (Internal Server Error)
https://myhost/services.xsodata/Entities('key')?$expand=navToAnotherEntity
This is the error message when I try to use the parameter $expand
{
"error": {
"code": 500,
"message": {
"lang": "en-US",
"value": "Cannot read property 'type' of undefined"
}
}
}
Taking a look at the document SAP HANA Help, chapter SAP HANA Developer Guide for XS Advanced Model > Defining OData Services for XS Advanced Applications > OData Parameter Entity Sets, it says:
"This navigation property cannot be used in combination with the OData query options $expand, $filter and $orderby."
But I'm not using any SAP HANA Calculation Views, I'm using only CDS Views. I'm not using parameterized entity. Why does the error happen?
On an expand you don't put the navigation name but instead the child entity itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.