My old Hibernate-only code uses something like
session.createSQLQuery("SELECT * FROM CATS")
.addScalar("ID", Hibernate.LONG)
.addScalar("NAME", Hibernate.STRING)
.addScalar("BIRTHDATE", Hibernate.DATE)
In the new project we use Hibernate EntityManager (the JPA implementation).
Is there an equivalent to those calls to addScalar()? Do I need to specify the types of the returned columns as I did before?
For example, if I don't use addScalar will the SQL query results be cached?