DATAJPA-656 - Make sure SimpleJpaRepository.count(Specification) works with group clauses.
SimpleJpaRepository.count(Specification) now uses QueryUtils.executeCountQuery(…) to make sure we correctly treat Specifications with group-by clauses.
This commit is contained in:
@@ -385,8 +385,7 @@ public class SimpleJpaRepository<T, ID extends Serializable> implements JpaRepos
|
||||
* @see org.springframework.data.jpa.repository.JpaSpecificationExecutor#count(org.springframework.data.jpa.domain.Specification)
|
||||
*/
|
||||
public long count(Specification<T> spec) {
|
||||
|
||||
return getCountQuery(spec).getSingleResult();
|
||||
return QueryUtils.executeCountQuery(getCountQuery(spec));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user