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

Spring Data JpaRepository pagination and sorting doesn't work after bump to Spring Boot 3.2 #41136

Closed
michalvavrik opened this issue Jun 11, 2024 · 6 comments · Fixed by #41206
Labels
area/spring Issues relating to the Spring integration kind/bug Something isn't working
Milestone

Comments

@michalvavrik
Copy link
Member

michalvavrik commented Jun 11, 2024

Describe the bug

After #40344 I detected a change to behavior.
I have REST repo like this:

public interface ArticleJpaRepository extends JpaRepository<Article, Long> {
}

previous when I send request to /article-jpa with query params size and page I received paginated results. That doesn't seem to be true anymore even though JpaRepository still extends PagingAndSortingRepository. Now I receive all the results, response is not paginated.

Also, sorting with sort query param stopped to work as well.

Expected behavior

I could be missing some new required change, so either it could be documented or fixed.

Actual behavior

Unsorted and unpaginated results.

How to Reproduce?

  1. git clone git@github.com:michalvavrik/quarkus-test-suite.git -b feature/fix-spring-data-compilation
  2. cd quarkus-test-suite/spring/spring-data
  3. mvn clean verify -Dit.test=JpaRepositoryRestResourceIT#sorting -Dreruns=0 and mvn clean verify -Dit.test=JpaRepositoryRestResourceIT#pagination -Dreruns=0

Output of uname -a or ver

Fedora 38

Output of java -version

OpenJDK 21

Quarkus version or git rev

999-SNAPSHOT

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.4

Additional information

No response

@michalvavrik michalvavrik added the kind/bug Something isn't working label Jun 11, 2024
@quarkus-bot quarkus-bot bot added the area/spring Issues relating to the Spring integration label Jun 11, 2024
Copy link

quarkus-bot bot commented Jun 11, 2024

/cc @geoand (spring)

@michalvavrik
Copy link
Member Author

michalvavrik commented Jun 11, 2024

/cc @aureamunoz

@jedla97
Copy link
Contributor

jedla97 commented Jun 12, 2024

Just my observation from fixing different testsuite.

Parameters mentioned above are working when using CrudRepository and PagingAndSortingRepository. Not working when using ListCrudRepository and ListPagingAndSortingRepository. These two extending JpaRepository. So maybe this will be helpful when looking for fix

@aureamunoz
Copy link
Member

I mananaged to fix but I still need to add some tests.
It's going to need a new release of quarkus-spring-api @gsmet. I'll let you know soon

@michalvavrik
Copy link
Member Author

I mananaged to fix but I still need to add some tests.

thanks for info and working on it

@geoand
Copy link
Contributor

geoand commented Jun 17, 2024

Fixed by #41206

@geoand geoand closed this as completed Jun 17, 2024
@geoand geoand added this to the 3.13 - main milestone Jun 17, 2024
@gsmet gsmet modified the milestones: 3.13 - main, 3.12.0 Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/spring Issues relating to the Spring integration kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants