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

IllegalArgumentException when instantiating CoroutineSortingRepository interface [DATACMNS-1769] #2184

spring-projects-issues opened this issue Jul 18, 2020 · 1 comment
in: repository status: invalid


Copy link

@spring-projects-issues spring-projects-issues commented Jul 18, 2020

duke9509 opened DATACMNS-1769 and commented

Attempting to create a repository that extends CoroutineSortingRepository results in the following exception being thrown on bean instantiation:

java.lang.IllegalArgumentException: Failed to create query for method public abstract kotlinx.coroutines.flow.Flow! No property findAll found for type TestModel!

It appears that the findAll(sort) method added by CoroutineSortingRepository is getting parsed as a query for some reason.

The attached reproduction project is using Spring Boot 2.4.0-M1, but the same code also reproduces the issue on 2.3.1.RELEASE and 2.3.2.BUILD-SNAPSHOT

Affects: 2.3.1 (Neumann SR1), 2.4 M1 (2020.0.0), 2.3.2 (Neumann SR2)


Copy link

@spring-projects-issues spring-projects-issues commented Jul 20, 2020

Mark Paluch commented

Coroutine repository interfaces mirror Reactive…Repository interfaces as they adopt reactive functionality and expose it as Kotlin Coroutines.

Spring Data R2DBC does not implement ReactiveSortingRepository, therefore R2DBC Coroutine repositories must make use of CoroutineCrudRepository and cannot use CoroutineSortingRepository.

Do you want to submit a pull request against so that SimpleR2dbcRepository implements ReactiveSortingRepository?

Closing this ticket here as Spring Data Commons isn't the right project to continue

@spring-projects-issues spring-projects-issues added status: invalid in: repository labels Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: repository status: invalid
None yet

No branches or pull requests

2 participants