Migrate to Hibernate 7.0.x
MSALThis recipe will apply changes commonly needed when migrating to Hibernate 7.0.x.
org. openrewrite. hibernate. MigrateToHibernate70mod run . --recipe= org. openrewrite. hibernate. MigrateToHibernate70Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- Migrate to Hibernate 6.6.x
- Migrate
persistence.xmlto Jakarta Persistence 3.2 - Migrate Hibernate Types to Hypersistence Utils for Hibernate 7.0
- Migrate dialects removed in Hibernate 7.0 to their generic equivalents
- Upgrade Gradle or Maven dependency versions
org.hibernate.orm:*:7.0.x - Change Gradle or Maven dependency
org.hibernate.orm:hibernate-jpamodelgen - Change Maven plugin group and artifact ID
org.hibernate.orm:hibernate-maven-plugin - Upgrade Maven plugin version
org.hibernate.orm:hibernate-maven-plugin:7.0.x - Change type
AdditionalJaxbMappingProducertoAdditionalMappingContributor - Change type
MetadataContributortoAdditionalMappingContributor - Change type
SqmQualifiedJointoSqmJoin - Change method name
org.hibernate.Session save(Object)topersist - Change method name
org.hibernate.Session save(String, Object)topersist - Change method name
org.hibernate.Session delete(Object)toremove - Change method name
org.hibernate.Session delete(String, Object)toremove - Change method name
org.hibernate.Session get(Class, java.io.Serializable)tofind - Change method name
org.hibernate.Session get(String, java.io.Serializable)tofind - Change method name
org.hibernate.Session load(Class, java.io.Serializable)togetReference - Change method name
org.hibernate.Session load(String, java.io.Serializable)togetReference - Replace constant with another constant
- Remove
@GeneratedValuestrategy when a custom@GenericGeneratoris used