pramoth / specification-with-projection

Support projections with JpaSpecificationExecutor.findAll(Specification,Pageable) for Spring Data JPA
MIT License
164 stars 56 forks source link

Add count() method to get the count #26

Open naris opened 2 years ago

naris commented 2 years ago

I need to be able to get the count() of rows matching the specification without actually fetching all the rows (for pagination in an Angular/PrimeNG application generated by JHipster).

Could you please add one?

v-ladynev commented 2 years ago

@naris You can extend your repository with standard JpaSpecificationExecutor to use count(specification). Don't need to extend the library for that.