7

I'm using Spring Boot 1.5.13.RELEASE and I'm trying to use the javax.persistence.Tuple to receive the results from a native query, like:

Query q = em.createNativeQuery(QUERY_STRING, Tuple.class);
q.setParameter(1, param1);
q.getResultList();

But I receive the following error on getResultList:

org.hibernate.MappingException: Unknown entity: javax.persistence.Tuple

Accordly with some links, this should work.

So, how use the Tuple on native queries? Is it possible?

Thanks!

Dherik
  • 17,757
  • 11
  • 115
  • 164

1 Answers1

4

According to the link that you provided, It will only work if you're using Hibernate 5.2.11+ ....

Carlitos Way
  • 3,279
  • 20
  • 30