I have next situation.
I have Entity which doesn't have representation in database. Also I have 3 table in database which have fields which could be mapped into my entity. So using spring data jpa I want write such method, so I could get this fields in my entity and map them in it.
As I understood I can't use JPQL cause table don't have entities class equivalents. So I used native query with my method
@Query(nativeQuery = true, value = "")
public List<UnitConfig> findBysomeName(String someName);
But I got next exception: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.Object[]] to type
As I understood Spring data jpa can't map result to my entity. How can I implement such method???