openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

MockServer: Support for Navigation Property filtering

Open jasper07 opened this issue 11 years ago • 2 comments

The following is supported in both OData and Gateway

http://services.odata.org/V2/OData/OData.svc/Products?$top=20&$filter=Category/Name eq 'Beverages'

Filter a list binding based on a navigation property value.

It doesn't work in the Mockserver , Category/Name is treated as a Complex Type

// support for 1 level complex type property
var sPropName, sComplexType;
var iComplexType = aSort[0].indexOf("/");

If the binding OperationMode === Client it works ok as the filter is done locally, it would be nice if this worked for both scenarios.

JSP

jasper07 avatar Jul 27 '15 06:07 jasper07

Thanks for reporting. Internal reference 1570768053.

matz3 avatar Jul 27 '15 08:07 matz3

Fixed for version 1.32. The fix does not fail requests with non-expanded navigation filter anymore, but provides a proper error message to the console and ignores the filter. For the filter to take effect, the corresponding navigation property needs to also be expanded using $expand.

galroter-sap avatar Aug 17 '15 09:08 galroter-sap