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

Expose method to obtain the repository query method return type [DATACMNS-1738] #2159

Closed
spring-projects-issues opened this issue Jun 9, 2020 · 0 comments
Assignees
Labels
in: repository type: enhancement

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Jun 9, 2020

Mark Paluch opened DATACMNS-1738 and commented

Obtaining a method return type usually works using Method.getReturnType except for suspended Kotlin methods (e.g. suspend fun foo()) as Kotlin changes the bytecode signature to return Object and the return type is synthesized as method argument through the generic parameter of Continuation<...>.

Therefore, obtaining the return type for a suspended method requires an inspection of the method parameters. We should provide a utility method in RepositoryMetadata so that we can reuse this functionality from store modules


Affects: 2.3 GA (Neumann), 2.4 M1 (2020.0.0)

Issue Links:

  • DATAMONGO-2562 CoroutineCrudRepository findAllBy throwing IncorrectResultSizeDataAccessException when more than 1 result
    ("is depended on by")

Backported to: 2.3.1 (Neumann SR1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: repository type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants