Persistence Unit Introduction#
What Is The Persistence Unit?#
Persistence Unit: Defines a complete Object-Relational Model mapping (ORM) (entities + supporting structures) with a relational database. The EntityManagerFactory uses this data to create a EntityManager that is associated with a Persistence Context.- A
persistence unitspecifies all entities, which are managed by theEntityManagersof the application. Eachpersistence unitcontains all entities classes representing the data stored in a single database.