Hi, I have a DAO class that extends Spring's HibernateDaoSupport.
Because Spring's support, the data access methods in this DAO class do not have to
declare any exceptions if I use commands such as
return getHibernateTemplate().find("from Customer");
However, I would like to use Hibernate's named query feature. If I use:
getNamedQuery("example.GetCustomers").list();
I have to explicitly declare HibernateException in method declarations.
I am a bit confused. Spring is well-known for its capability of
translating vendor-specific checked data exceptions into unchecked ones.
I would like to know whether I did something wrong.
Any comment is greatly appreicated!
Pete


Reply With Quote