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?
to your account
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 org.springframework.data.repository.kotlin.CoroutineSortingRepository.findAll(org.springframework.data.domain.Sort)! 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)
The text was updated successfully, but these errors were encountered:
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 https://github.com/spring-projects/spring-data-r2dbc/ so that SimpleR2dbcRepository implements ReactiveSortingRepository?
Closing this ticket here as Spring Data Commons isn't the right project to continue
Sorry, something went wrong.
No branches or pull requests