Basic jpa and hibernate concepts

== SessionFactory vs EntityManagerFactory

SessionFactory: Hibernate interface

EntityManagerFactory: JPA standard interface


Best practice is to use JPA, the EntityManager. In case you missed features provided by Session, you can always get Session from the following statement:

Session session = entityManager.unwrap(Session.class);


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章