This content has been marked as final. Show 3 replies
I advise you to use a native query. For example:
String sql ="...your SQL query..."; Query sqlQuery = entityManager.createNativeQuery(sql,Data.class); List<Data> dataList = sqlQuery.getResultList();
Hope it helps you!
this is what I was looking for! thanks a lot. I just changed it so I don't specify class of the results and take it from Object when iterating throught the results list.
That´s ok as well, I forgot to say you that it is not compulsory to specify a data class. So this
Query sqlQuery = entityManager.createNativeQuery(sql);