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
Add the missing resultClass
@NamedNativeQuery(name = "findAllDataMapping", resultClass = Entity.class, query="sql")
Or
@NamedNativeQuery(name = "findAllDataMapping", resultClass = MyVO.class, resultSetMapping ="findAllDataMapping" query = "sql")
and lastly call the query in your repository
@Query(nativeQuery = true, name = "findAllDataMapping")
List findAllOfMyVO(@Param("param1") String param1, @Param("param2") String param2);