I have a criteria query that returns distinct results and sorts by an associated entity's property (e.g. owner.name
) with a respective PageRequest.
When I upgrade to Spring Boot (Data JPA) 3.4.3, I get ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
from PostgreSQL.
If I downgrade Hibernate to a version before 6.6.6.Final, the error does not occur.