|
In 4.3's online doc(http://docs.jboss.org/hibernate/orm/4.3/manual/en-US/html_single/#d5e8301), section 18.1.1, it mentions
To avoid the overhead of using ResultSetMetadata, or simply to be more explicit in what is returned, one can use addScalar():
sess.createSQLQuery("SELECT * FROM CATS") .addScalar("ID", Hibernate.LONG) .addScalar("NAME", Hibernate.STRING) .addScalar("BIRTHDATE", Hibernate.DATE)
But there is no constant "STRING" or "DATE" in class Hibernate any more, pls update the doc
|