I've a JPA DATA repository which contains a certain custom method, something like:
@Query(value=<quite-complex-query>, nativeQuery=true)
List<Object> myCustomRepoMethod();
Now the problem is that I'm returning a List<Object>
, instead I want to return a list of MyCustomType
, but it's not working, because the query is returning a few columns which apparently are not able to be mapped to MyCustomType
's fields.
How can I solve this?