The Java Persistence API (JPA) is a specification of Java. It is used to persist data between Java object and relational database. JPA acts as a bridge between object-oriented domain models and relational database systems.
As JPA is just a specification, it doesn't perform any operation by itself. It requires an implementation. So, ORM tools like Hibernate, TopLink and iBatis implements JPA specifications for data persistence.
The first version of Java Persistenece API, JPA 1.0 was released in 2006 as a part of EJB 3.0 specification.
Following are the other development versions released under JPA specification: -
- JPA 2.0 - This version was released in the last of 2009. Following are the important features of this version: -
- It supports validation.
- It expands the functionality of object-relational mapping.
- It shares the object of cache support.
- JPA 2.1 - The JPA 2.1 was released in 2013 with the following features: -
- It allows fetching of objects.
- It provides support for criteria update/delete.
- It generates schema.
- JPA 2.2 - The JPA 2.2 was released as a development of maintainenece in 2017. Some of its important feature are: -
- It supports Java 8 Date and Time.
- It provides @Repeatable annotation that can be used when we want to apply the same annotations to a declaration or type use.
- It allows JPA annotation to be used in meta-annotations.
- It provides an ability to stream a query result.