This guide discusses migration to Hibernate ORM version 7.2. For migration from earlier versions, see any other pertinent migration guides as well.
See the website for the list of requirements for the 7.2 series.
See the website for the list of new features in the 7.2 series.
This section describes changes to contracts (classes, interfaces, methods, etc.) which are considered API.
-
Code underlying the session builder APIs was reengineered, and the behavior of
noInterceptor()forSharedSessionBuilderandSharedStatelessSessionBuilderwas aligned with the preexisting semantics of this method onSessionBuilderandStatelessSessionBuilder. The previous behavior may be recovered by callingnoSessionInterceptorCreation(). -
org.hibernate.dialect.AzureSQLServerDialectwas deprecated. Useorg.hibernate.dialect.SQLServerDialectinstead. If you sethibernate.boot.allow_jdbc_metadata_access=falsefor offline startup, remember to also set the targeted database version throughjakarta.persistence.database-product-version; this would be 16.0 for SQL Server 2022 or 17.0 for SQL Server 2025.
This section describes changes to contracts (classes, interfaces, methods, etc.) which are considered SPI.
-
Some operations of
TypeConfiguration,JavaTypeRegistry, andBasicTypeRegistryused unbound type parameters in the return type. The generic signatures of these methods have been changed for improved type safety.
This section describes changes to DDL generated by the schema export tooling. Such changes typically do not impact programs using a relational schema managed externally to Hibernate.