Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slice support on JpaSpecificationExecutor [DATAJPA-961] #1311

Open
spring-projects-issues opened this issue Sep 9, 2016 · 4 comments
Open

Slice support on JpaSpecificationExecutor [DATAJPA-961] #1311

spring-projects-issues opened this issue Sep 9, 2016 · 4 comments
Assignees
Labels
in: core type: enhancement

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Sep 9, 2016

Ali Shahbour opened DATAJPA-961 and commented

Currently interface JpaSpecificationExecutor expose the findAll as List and Page , so if you are querying on a very big table the count(*) will slow down the performance , i suggest to support Slice with Page same as in other Repositories .


Reference URL: http://stackoverflow.com/questions/39367046/slice-on-jpaspecificationexecutor/39389393#39389393

Issue Links:

  • DATAJPA-734 Provide a Slice based implementation of PagingAndSortingRepository

3 votes, 5 watchers

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Sep 26, 2016

Thibaud Lepretre commented

Duplicate from https://jira.spring.io/browse/DATAJPA-734

But really appreciable improvement, even more when using MySQL that read all index to perform count. Slice can be useful for generating Link header more easily than with List

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Oct 25, 2019

Jens Schauder commented

DATAJPA-734 is similar but not the same

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Oct 7, 2020

mceste-volume commented

I've worked around this problem by constructing a JPA query from a Specification, applying the offset/limit from the Pageable and wrapping the results in a Slice. Ideally there would be a way to enable this on the Repository interface itself without a custom implementation

@spring-projects-issues spring-projects-issues added type: enhancement in: core labels Dec 30, 2020
@mvdobrinin
Copy link

@mvdobrinin mvdobrinin commented Jan 15, 2021

Would be really nice to have this. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: enhancement
Projects
None yet
Development

No branches or pull requests

3 participants