In development for Jakarta EE 12.
Version history
Jakarta Persistence (JPA) versions
JPA is the specification; Hibernate, EclipseLink and OpenJPA implement it, and Spring Data JPA builds on it. It began as part of Java EE 5, moved to the Eclipse Foundation as Jakarta Persistence, and changed its package from javax.persistence to jakarta.persistence in version 3.0.
Upgrade planner
Pick the version you’re on and the one you want. You’ll see everything that changes in between, oldest first, with breaking changes marked.
2 releases to go through, with 9 new features and 1 breaking or removed items. Java baseline: Java 8 → 17. Platform: Jakarta EE 9 → Jakarta EE 11.
JPA 3.1 Apr 2022
- New UUID as a basic type and GenerationType.UUID for ids
- New New JPQL and Criteria functions: CEILING, EXP, FLOOR, LN, POWER, ROUND, SIGN, EXTRACT, LOCAL DATE/TIME
- Breaking Java SE 11 baseline
JPA 3.2 2024
- New Java records as embeddable types
- New Programmatic setup with PersistenceConfiguration, no persistence.xml needed
- New runInTransaction and callInTransaction on EntityManagerFactory
- New JPQL set operations: UNION, INTERSECT and EXCEPT
- New New JPQL functions and syntax: ||, LEFT, RIGHT, REPLACE, CAST, id(), version(), NULLS FIRST/LAST
- New java.time.Instant and Year supported; @EnumeratedValue for custom enum values
- New SchemaManager API and typed FindOption, LockOption and RefreshOption
- Deprecated java.util.Date, Calendar and @Temporal deprecated
Specifications don’t expire; what matters is which version your framework and implementation support.
- NewJava records as embeddable types
- NewProgrammatic setup with PersistenceConfiguration, no persistence.xml needed
- NewrunInTransaction and callInTransaction on EntityManagerFactory
- NewJPQL set operations: UNION, INTERSECT and EXCEPT
- NewNew JPQL functions and syntax: ||, LEFT, RIGHT, REPLACE, CAST, id(), version(), NULLS FIRST/LAST
- Newjava.time.Instant and Year supported; @EnumeratedValue for custom enum values
- NewSchemaManager API and typed FindOption, LockOption and RefreshOption
- Deprecatedjava.util.Date, Calendar and @Temporal deprecated
- NewUUID as a basic type and GenerationType.UUID for ids
- NewNew JPQL and Criteria functions: CEILING, EXP, FLOOR, LN, POWER, ROUND, SIGN, EXTRACT, LOCAL DATE/TIME
- BreakingJava SE 11 baseline
- BreakingPackage renamed from javax.persistence to jakarta.persistence
- ImprovedNo new features: this release only changed the namespace
- Newjava.time types such as LocalDate and LocalDateTime supported
- NewStream results with getResultStream()
- NewRepeatable annotations
- NewCDI injection into AttributeConverters
Re-released as Jakarta Persistence 2.2 for Jakarta EE 8 in 2019, still with javax packages.
- NewAttributeConverter and @Convert
- NewEntity graphs for fetch planning
- NewStored procedure queries
- NewBulk update and delete with the Criteria API
- NewSchema generation from entity mappings
- NewThe Criteria API and the metamodel
- New@ElementCollection for collections of values
- NeworphanRemoval and @OrderColumn
- NewPessimistic locking
- NewBean Validation integration and a standard second-level cache API
- NewAnnotation-based entity mapping: @Entity, @Id and relationships
- NewEntityManager and the persistence context
- NewThe JPQL query language