title: hibernate jpa projection with @Query
body: <p>Most of the examples I've seen is using entityManager.createQuery or .createNativeQuery etc.</p>
  
  <p>Is there a way to have something like the following working?</p>
  
  <pre><code>data class SummaryDto(val employeeName: String, val employerName: String)
  
  @Query("select e.name as employeeName, emp.name as employerName " +
              "from Employer e " +
              "inner join Employee emp on emp.employer_id = e.id ", nativeQuery = true)
      fun findSummaries(): List&lt;SummaryDto&gt;
  </code></pre>
  
  <p>When I ran the above code</p>
  
  <p>I got this error 
  No converter found capable of converting from type 
  <code>[org.springframework.data.jpa.repository.query.AbstractJpaQuery$TupleConverter$TupleBackedMap] to type [dto.SummaryDto]</code>   </p>
  
  <p>Can this be done with Kotlin or is there another way to get this to work with Hibernate JPA Annotation based?</p>
  
  <p>Thanks
  Tin</p>