micronaut-data icon indicating copy to clipboard operation
micronaut-data copied to clipboard

micronaut-data-r2dbc does not recognize inherited Introspected annotation

Open rawilder opened this issue 2 years ago • 0 comments

Expected Behavior

Using an annotation like @Serdeable that has @Introspected, I would expect the repository to recognize the type as a dto projection

Actual Behaviour

If @Introspected is not specifically on the type exactly, the repository will not recognize the type as a dto and try a different entity to dto path than the correct one

Steps To Reproduce

  1. Make a project with r2dbc and micronaut-serialization
  2. Create a table, entity, repository, and dto
  3. Mark dto as @Serdeable
  4. Make a repository method that returns the dto
  5. Try to use it and observe the projection fail

The branch linked below has tests showing this happening.

Environment Information

jdk 11 amazon corretto macos 12.3.1

Example Application

https://github.com/rawilder/r2dbc-dto-projections/tree/dto-projections-introspected

Version

3.4.2

rawilder avatar Apr 30 '22 00:04 rawilder