I do not use HibernateTemplate, but work with getCurrentSession() in my DAO.
I would like to know how to declare Hibernate named queries in a beans.xml file (I do not use hbm.xml).
And maybe Spring has alternative means to declare Hibernate named queries?
You can put named queries on the entity using annotations:
Also, if using JPA, there’s
orm.xml, The XSD tells us that you can use: