Unfortunately, we make heavy use of sessions, to create queries like thus:
String hql = "FROM ExecutionSummary WHERE datamartSeq=:seq order by endTime desc";
List list = getSession().createQuery(hql)
I could have missed it, but I don't see a createQuery() method for HibernateTemplate:
Integer count = (Integer) getSession().
createQuery("select count(*) FROM FolderContent fc where fc.folder=:folder").
<a href="http://www.s...html</a><br />
Is there another way to create queries? There are methods available via queries that have no equivalent in HibernateTemplate (like uniqueResult()).
Also (and I don't expect an answer to this, but maybe a comment), "Hibernate in Action", chapter 7, is chock-a-block full of using session to create queries. If the API says "don't do this", I can't understand why the authors of this book would use it anyway.