Does anybody know of a good list of what is new in JPA 2? Not what is new with Hibernate/TopLink in the version that supports JPA 2 but what is new in the actual spec.
JPA 2.0: A Java Persistence Update Covers JDBC Properties, Access Mode, Mappings, Shared Cache, the TypedQuery interface, JPQL, Pessimistic Locking, the Criteria API and Validation.
Jakarta Persistence 3.0 The JPA was renamed as Jakarta Persistence in 2019 and version 3.0 was released in 2020.
Data Persistence is a means for an application to persist and retrieve information from a non-volatile storage system. Persistence is vital to enterprise applications because of the required access to relational databases.
JPA Implementation JPA describes relational data management in Java application. It is a specification and there are a number of implementations of it. Some popular implementations are Hibernate, EclipseLink, and Apache OpenJPA. JPA defines the metadata via annotations in Java classes or via XML configuration files.
The link mentioned in the accepted answer doesn't say anything about the second level cache so I decided to post a quick list to summarize "What's new in JPA 2.0 (JSR-317)":
persistence.xml
- E.g. javax.persistence.jdbc.driver
, etc instead of persistence provider specific properties.PROPERTY
and FIELD
access type can be mixed in a hierarchy and combined in a single class.@ElementCollection
, @OrderColumn
- For better collection support.@OneToMany
/ @OneToOne
- For expanded mappings.QueryBuilder
and CriteriaQuery
for programmatic construction of type-safe queries.EntityManager
(supported properties, detach
method, etc) and Query
(query hints).If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With