SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.96k stars 1.24k forks source link

MockServer: Filtering with Value `null` Results in All or Nothing #1955

Closed boghyon closed 2 years ago

boghyon commented 6 years ago

OpenUI5 version:

Tested with 1.52.7 and 1.55.0-SNAPSHOT

URL (minimal example if possible):

https://jsbin.com/nojaru/edit?js,console

Steps to reproduce the problem:

Given: Entities with a nullable property whose value can be an actual null (instead of empty string). In the example case above, it's the "Region" property from the Employees set.

  1. Visit the example page above. The mock server is initialized.
  2. After the mock server starts, in the read success callback, observe how the mock server returns 0 employees when filtered by "Region" with value1: null and operator: "EQ". If operator: "NE" is used, all employees are returned as if no filter were applied.
  3. Switch useMockServer to false and wait until the real results have arrived (with the same filter)
  4. UI5 correctly returns 4 entries out of 9 (there are 4 employees with the Region: null).

What is the expected result?

Filtering with a mock server behaves like filtering without.

What happens instead?

Surprise and confusion

Any other information? (attach screenshot if possible)

The example uses the proxy service https://cors-anywhere.herokuapp.com. It might be possible that the example fails to work due to too many requests having been sent through the proxy. In this case, try running the example at a later time.

gerym commented 6 years ago

Hello @boghyon ,

Thank you for sharing this finding. I've created an internal incident 1870102366. The status of the issue will be updated here in GitHub.

Regards, Gery

boghyon commented 3 years ago

Note: the above JSBin sample fails now since the public proxy server https://cors-anywhere.herokuapp.com is no longer usable (See the announcement https://github.com/Rob--W/cors-anywhere/issues/301). And OData sample services such as Northwind don't support CORS yet: https://github.com/OData/ODataSamples/issues/29

licam commented 2 years ago

Hello, We currently support mockserver in maintenance mode, meaning that only regression issues are handled. Therefore, if this usa case functionality wasn't supported it won't be fixed.

If this issue is still relevant please consider to raise this issue/requirement to the Fiori Tech Program. We also accept contribution. Please use this contribution process guide: https://github.com/SAP/openui5/blob/master/CONTRIBUTING.md#contribution-content-guidelines

Thanks and regards, Licam