Hi guys; I'm here again. :D
Can I use getNamedQuery Hibernate and AliasToBeanResultTransformer together?
I main in this way:
Code:
Session session = (Session) getJpaTemplate().getEntityManager()
.getDelegate();
List<DatosAcademicos> lista = session
.getNamedQuery(
"DatosAcademicos.findDatosAcademicosByIdSolicitante")
.setParameter("solicitanteId", 128)
.setResultTransformer(
new AliasToBeanResultTransformer(
DatosAcademicos.class)).list();
If I change getNamedQuery for CreateSQLQuery it works; but I prefer to use NamedQueries.