Closed
Description
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.