Closed
Description
When writing e.g. this query:
@Query("SELECT id FROM Person")
Page<Long> findIdsPageable(Pageable pageable);
I get always only one page of data and I can see this in the log:
Hibernate: select p1_0.ID from Person p1_0 fetch first ? rows only
Hibernate: select count(null) from Person p1_0
2025-01-13 22:59:44,762 (main) WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] SQL Warning Code: -1003, SQLState: 01003
2025-01-13 22:59:44,763 (main) WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] warning: null value eliminated in set function
When using previous version of spring-data-jpa (3.3.7), I can see correct count(...) query and paging is working correctly:
Hibernate: select p1_0.ID from Person p1_0 fetch first ? rows only
Hibernate: select count(p1_0.ID) from Person p1_0
Is there something I should do differently to fix this issue?