SAP / 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
121 stars 76 forks source link

v2.1.0, $count is not working whatsoever; pagination is not working #330

Open akaFood opened 2 weeks ago

akaFood commented 2 weeks ago

when using $count = true or enable paginaiton, the following error is returned: "class java.lang.Integer cannot be cast to class java.lang.Long (java.lang.Integer and java.lang.Long are in module java.base of loader 'bootstrap')". The error was thrown at JPAExamplePagingProvider.class, getFirstPageMethod, Long maxResults = countQuery.countResults();. Inside JPAJoinCountQuery.class, line 47 - return (Long) result.get(0); I saw that the total records count returned was Integer type, and its getting casted to Long, hence why the error occurred.

Screenshot 2024-06-13 123549

wog48 commented 6 days ago

What database do you use?

akaFood commented 6 days ago

What database do you use?

DB2