Closed jeremychone closed 11 years ago
The right way to do some lowlevel JDBC work would be using the Session.doWork.
http://stackoverflow.com/questions/3526556/session-connection-deprecated-on-hibernate
session.doWork(
new Work() {
public void execute(Connection connection) throws SQLException
{
doSomething(connection);
}
}
);
Done, available from 2.0.1-SNAPSHOT
In Hibernate 4.x deprecated getConnectionProvider is deprecated, and using the JDBC connection as such create memory leaks. So, removing these two level API from the HibernateDaoHelper.
Developers should use HQL as much as possible (with the HibernateDaoHelper.executeHql), or use the Session.doWork method bellow to do the low level work (see below).