Skip to content

Conversation

@schauder
Copy link
Contributor

Since both the Query and the Pageable have limit, offset and sorting information, these methods are confusing and the strategy to resolve the conflict is not clear.

Existing code using the methods got replaced.

Users of these methods should use the various findAll and findBy methods to construct Page objects as desired.

Closes #2138

Since both the Query and the Pageable have limit, offset and sorting information, these methods are confusing and the strategy to resolve the conflict is not clear.

Existing code using the methods got replaced.

Users of these methods should use the various findAll and findBy methods to construct Page objects as desired.

Closes #2138

private Query applyPageable(Query query, Pageable pageable) {

if (pageable.isPaged()) {
Copy link
Member

@mp911de mp911de Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to not use Query.with(Pageable)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course! Lack of knowledge 8-)

Use Query.with(Pageable) instead of new method.

See #2138
Original pull request #2161
mp911de pushed a commit that referenced this pull request Oct 23, 2025
Since both the Query and the Pageable have limit, offset and sorting information, these methods are confusing and the strategy to resolve the conflict is not clear.

Existing code using the methods got replaced.

Users of these methods should use the various findAll and findBy methods to construct Page objects as desired.

Closes #2138
Original pull request #2161
mp911de added a commit that referenced this pull request Oct 23, 2025
Refine deprecation messages. Simplify conversion, use Stream methods directly.

See #2138
Original pull request #2161
mp911de pushed a commit that referenced this pull request Oct 23, 2025
Since both the Query and the Pageable have limit, offset and sorting information, these methods are confusing and the strategy to resolve the conflict is not clear.

Existing code using the methods got replaced.

Users of these methods should use the various findAll and findBy methods to construct Page objects as desired.

Closes #2138
Original pull request #2161
mp911de added a commit that referenced this pull request Oct 23, 2025
Refine deprecation messages. Simplify conversion, use Stream methods directly.

See #2138
Original pull request #2161
@mp911de mp911de changed the title Deprecate methods taking a Query and a Pageable returning a Page. Deprecate methods accepting Query and Pageable returning Page Oct 23, 2025
@mp911de mp911de added the type: bug A general bug label Oct 23, 2025
@mp911de mp911de added this to the 3.5.6 (2025.0.6) milestone Oct 23, 2025
@mp911de mp911de closed this Oct 23, 2025
@mp911de mp911de deleted the issue/2138-remove-Page-results branch October 23, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent pagination API design using JdbcAggregateTemplate.findAll(Query, Pageable)

2 participants