1 Ocak 2019 Salı

NativeQuery Arayüzü - Kullanmayın

setResultTransformer metodu
Şöyle yaparız.
List<Job> jobList = entityManager.createNativeQuery(query)
  .setParameter("submittedDate", submittedDate)
  .unwrap( org.hibernate.query.NativeQuery.class )
  .setResultTransformer( Transformers.aliasToBean( Job.class ) )
  .getResultList();


Hiç yorum yok:

Yorum Gönder