exxcellent / olingo-jpa-processor-v4

The JPA Processor fills the gap between Olingo V4 and the database, by providing a mapping between JPA metadata and OData metadata, generating queries and supporting the entity manipulations.
Apache License 2.0
5 stars 3 forks source link

fix(JPAEntityProcessor): An empty collection does not return 204 #3

Closed FWidm closed 5 years ago

FWidm commented 5 years ago

According to the OData protocol, 204 should only be returned if the resource is null. Currently we return null on an empty list result. cf: odata v4 errata:

9.1.4 Response Code 204 No Content A request returns 204 No Content if the requested resource has the null value, or if the service applies a return=minimal preference. In this case, the response body MUST be empty.