6

Jakarta Persistence 3.2 (Under Development) | The Eclipse Foundation

 1 year ago
source link: https://deploy-preview-652--jakartaee-specifications.netlify.app/specifications/persistence/3.2/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Jakarta Persistence 3.2 (under development)

Release for Jakarta EE 11

Jakarta Persistence defines a standard for management of persistence and object/relational mapping in Java(R) environments.

New features, enhancements or additions

  • Adds support for Java record types as embeddable classes
  • Adds support for java.time.Instant and java.time.Year and Clarifies JDBC mappings for basic types
  • Adds union, intersect, except, cast, left, right, and replace for Jakarta Persistence QL and criteria queries
  • Adds || string concatenation operator to Jakarta Persistence QL
  • Adds subquery(EntityType) and joins on EntityType Criteria API
  • Adds support for specifying null precedence when ordering Jakarta Persistence QL and criteria queries
  • Adds getSingleResultOrNull() to Query, TypedQuery, StoredProcedureQuery
  • Adds entities(), classes() and columns() to NamedNativeQuery
  • Adds lockMode() to EntityResult with the default being OPTIMISTIC
  • Adds getVersion(), isLoaded(), load(), isInstance() and getClass() methods to PersistenceUnitUtil
  • Adds overload of entity() accepting an entity name to Metamodel
  • Adds javax.annotation.processing.Generated to the list of defined annotations on StaticMetamodel
  • Adds constants for managed types, named queries, named graphs and named result set mappings to generated StaticMetamodel
  • Adds LocalDateTime and Instant to supported Version types
  • Adds where(), having(), and(), and or() overloads accepting List to CriteriaQuery and CriteriaBuilder
  • Adds equalTo() and notEqualTo() to Expression
  • Adds concat() overload accepting list of expressions and extract() to CriteriaBuilder
  • Adds Graph interface as parent of EntityGraph and Subgraph and moved common operations there
  • Adds addAttributeNode(), removeAttributeNode(), addTreatedSubgraph(), addElementSubgraph(), addTreatedElementSubgraph(), addMapKeySubgraph(), and addTreatedMapKeySubgraph() methods to Graph
  • Adds getReference overload, runWithConnection() and callWithConnection() to EntityManager
  • Adds find(), refresh(), lock() overloads to EntityManager taking newly introduced FindOption, RefreshOption, and LockOption respectively
  • Adds setCacheStoreMode(), and setCacheRetrieveMode() methods to EntityManager and Query
  • Adds runInTransaction() and callInTransaction() to EntityManagerFactory
  • Adds programmatic API to obtain EntityManagerFactory using PersistenceConfiguration
  • Adds constants for properties defined by the specification to the PersistenceConfiguration
  • Adds SchemaManager API
  • Adds options member to elements which result in DDL generation
  • Adds EnumeratedValue allowing custom mapping of fields of Java enums
  • Adds comment and check members to table and column annotations, along with CheckConstraint
  • Made the name member of TableGenerator and SequenceGenerator optional
  • Clarifies the primary key types supported for each GenerationType
  • Clarifies availability of SEQUENCE, TABLE and UUID generated IDs on PrePersist
  • Clarifies semantics of numeric literals and Adds support for bi and bd suffixes
  • Clarifies rules around distinction of entity names and identification variables and case-sensitivity in Jakarta Persistence QL queries
  • Clarifies the semantics of Bindable.ENTITY_TYPE in javadoc
  • Entity and embeddable classes may now be static inner classes
  • Primary key classes are no longer required to be public and serializable
  • Pulls getParameters() up from CriteriaQuery to CommonAbstractCriteria
  • Fixes wildcard types in addSubgraph and addAttributeNode in Graph
  • Fixes lower type bounds to the Path.get entity argument X
  • Fixes example code in the javadoc of AttributeOverrides
  • Partially fixes raw types warnings through the API
  • Improves AsciiDoc formatting and fixes typos through the specification document

Removals, deprecations or backwards incompatible changes

Deprecations

  • Deprecates usage of Calendar, Date, Time, Timestamp, Temporal, MapKeyTemporal and TemporalType in new applications in favour of java.time API

Deprecations for removal

  • Deprecates addSubclassSubgraph() in EntityGraph for removal; addTreatedSubgraph() method should be used as direct replacement
  • Deprecates addSubgraph(Attribute, Class) and addKeySubgraph() in Graph/EntityGraph/SubGraph for removal; addTreatedSubgraph(Attribute, Class) and addMapKeySubgraph() methods should be used as direct replacements
  • Deprecates jakarta.persistence.spi.PersistenceUnitTransactionType for removal; jakarta.persistence.PersistenceUnitTransactionType methods should be used as direct replacement

Minimum Java SE Version

Java SE 17 or higher

Details

Compatible Implementations

Ballots

Release Review

Plan Review

The Specification Committee Ballot concluded successfully on 2023-06-29 with the following results.

Representative Representative for: Vote
Kenji Kazumura Fujitsu +1
Emily Jiang, Tom Watson IBM +1
Ed Bratt, Dmitry Kornilov Oracle +1
Andrew Pielage, Petr Aubrecht Payara +1
David Blevins, Jean-Louis Monteiro Tomitribe -1
Ivar Grimstad EE4J PMC +1
Marcelo Ancelmo, Abraham Marin-Perez Participant Members +1
Werner Keil Committer Members +1
Zhai Luchao Enterprise Members +1
Scott Stark, Scott Marlow Enterprise Members +1
Total 9

Non-binding votes

Representative Representative for: Vote
Jun Qian Primeton +1
Total 1

The ballot was run in the jakarta.ee-spec mailing list

Plan Review


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK