I was stuck with the following situation:
My entities are related to each other, but in such a way that i could not use JPQL. I was forced to use native SQL. Now I w
You need to mark your query as a query :) And you need to use MyVO instead of MyEntity, because that is the entity you have your resulsts mapped to
@Repository
public interface MyRepository extends JpaRepository {
@Query(nativeQuery = true)
List findAllOfMyVO(@Param("param1") String param1, @Param("param2") String param2);
}