In spring-date-jpa, when my specification contains query.distinct(true) i see that the count(Specification) method, the count query is incorrect.
The generated SQL looks like this :
select distinctcount(*) …
Instead of
select count(distinct(*)) …
In that post:spring-source-forum
The workaround was to mofify the source code of spring-data-jpa.
Is there any other solution?
I have found another workaround: