|
Why doesn't the Hibernate Entitymanager let users unwrap the underlying javax.sql.Connection?
I've checked with EclipseLink and OpenJPA and both allow:
em.unwrap(Connection.class);
Only Hibernate forces users to do stuff like this, which is obviously quite hacky:
( (SessionImpl) ( (org.hibernate.jpa.internal.EntityManagerImpl) em ).getSession() ).connection();
|