Skip to content

Add support for projections using repository query methods #971

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

Closed
eiswind opened this issue Apr 29, 2021 · 0 comments
Closed

Add support for projections using repository query methods #971

eiswind opened this issue Apr 29, 2021 · 0 comments
Assignees
Labels
type: enhancement A general enhancement

Comments

@eiswind
Copy link

eiswind commented Apr 29, 2021

When I create a Repository like:

interface TRepository : Repository<T, ID> {
    fun findAll(page:Pageable) : List<T>
}

the implementation uses

 Page<T> JdbcAggregateTemplate.findAll(Class<T> domainType, Pageable pageable) 

under the hood, which issues an (in this case) unnecessary "select count".

Can you think of adding an implementation that omits the additional select?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 29, 2021
@mp911de mp911de changed the title Support List<DomainType> Return Value with Pageable Support projections using Slice/Paging queries May 3, 2021
@schauder schauder added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels May 3, 2021
@mp911de mp911de self-assigned this May 3, 2021
@mp911de mp911de changed the title Support projections using Slice/Paging queries Add support for projections using repository query methods May 17, 2021
schauder added a commit that referenced this issue Jul 2, 2021
Also us Github issue numbers on tests.

See #578, #971
schauder added a commit that referenced this issue Jul 2, 2021
Also us Github issue numbers on tests.

Original pull request #903
See #578, #971
schauder added a commit that referenced this issue Jul 5, 2021
As suggested by Jay Bryant.

Original pull request #903
See #578, #971
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants