Jakarta Persistence 3.2
7.0 migrates to Jakarta Persistence 3.2 which can be fairly disruptive. See the Migration Guide for details.
See this blog post for a summary of the changes in 3.2
Java 17
Version 3.2 of Jakarta Persistence requires Java 17. Hibernate 7.0 therefore baselines on Java 17 whereas previous versions baseline on Java 11.
mapping.xsd
Hibernate 7.0 provides a new XSD that represents an "extension" of the Jakarta Persistence orm.xsd weaving in Hibernate-specific mapping features. The namespace for this extended mapping is http://www.hibernate.org/xsd/orm/mapping
hbm.xml Transformations
Transformaion of hbm.xml
files is much more full featured, able to transform many more constructs of the legacy <hibernate-maping/>
format into Hibernate’s "extension" to the Jakarta Persistence orm.xd
.
Domain Model Validations
7.0 does much more validation of an application’s domain model and especially its mapping details, e.g.
-
illegal combinations such as
@Basic
and@ManyToOne
on the same attribute -
misplaced annotations such as an annotated getter method with FIELD access
-
stricter following of JavaBean conventions
See the Migration Guide for details.
Hibernate Models
7.0 migrates from Hibernate Commons Annotations (HCANN) to the new Hibernate Models project for low-level processing of an application domain model, reading annotations and weaving in XML mapping documents.
See the Migration Guide for details.