I need to use raw SQL within a Spring Data Repository, is this possible? Everything I see around @Query
is always entity based.
The @Query annotation allows to execute native queries by setting the nativeQuery flag to true.
Quote from Spring Data JPA reference docs.
Also, see this section on how to do it with a named native query.