I'm new to Spring Data projection and I'm trying to use this feature in a new project.
In particular I'd like to use projections on a repo method associated to a complex query.
I annotated my method with the @Query annotation and declared a JPA query with several joined tables/entities and a complex where condition.
In this article I read that is possible to use an interface-based projection and a class-based projection, but only the first one supports nested projections.
I need nested projection but it seems that this feature is only supported using interface-based projections, and this approach is only possible with auto-generated query methods and not using explicit JPA queries. Is this right?
Is there a way to use interface-based projections using custom JPA queries?