What's new in JPA 2.2?
For those who are familiar with JPA, let's first introduce the new features provided by JPA 2.2:
- Stream query results
- Repeatable annotations
- Java 8 date and time support
- CDI support in converters
Architecture
The Java persistence API is built around the following components:
- Persistence provider: A persistence provider is a JPA implementation provided by a vendor. As with most Java APIs, JPA is a standard API, where a set of different actual implementations are available from different vendors. The persistence provider means the vendor of the actual implementation we are using.
- Entities: An entity is a class that represents a domain object in our enterprise application. From a JPA perspective, an entity is represented with a table in the database, and an instance of this entity represents a record in that table.
- Entity managers: An entity manager is an object that represents a connection to a database, and contains all methods for the different operations that can be performed...