I switched from using Hibernate API to the JPA API. Now im wondering because EntityMangager(Factory) does not feature any SessionFactory#getCurrentSession like methods.
Is there any build in comparable approach with EntityManger?
I switched from using Hibernate API to the JPA API. Now im wondering because EntityMangager(Factory) does not feature any SessionFactory#getCurrentSession like methods.
Is there any build in comparable approach with EntityManger?
You can get the session using Session session = entityManager.unwrap(Session.class)
, where Session
is a org.hibernate.Session
.