Migrate to Hibernate 4.0.x
Recipe ID
io.moderne.hibernate.MigrateToHibernate40Artifact
io.moderne.recipe:rewrite-hibernateThis recipe will apply changes commonly needed when migrating from Hibernate 3.x to 4.0.x, including migration of collection annotations to their JPA 2.0 equivalents.
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe io.moderne.hibernate.MigrateToHibernate40If the recipe isn’t available locally, install it with:
mod config recipes jar install io.moderne.recipe:rewrite-hibernate:0.26.3Definition
This recipe runs the following recipes in order.
- Upgrade Gradle or Maven dependency versions
org.openrewrite.java.dependencies.UpgradeDependencyVersion - Change type
org.openrewrite.java.ChangeType - Change type
org.openrewrite.java.ChangeType - Change annotation attribute name
org.openrewrite.java.ChangeAnnotationAttributeName - Change type
org.openrewrite.java.ChangeType - Migrate
@JoinTableto@CollectionTablefor element collectionsio.moderne.hibernate.update40.MigrateJoinTableToCollectionTable - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Index HQL/JPQL positional parameters in annotations
io.moderne.hibernate.update40.IndexHqlAnnotationPositionalParameters - Index HQL/JPQL positional parameters in annotations
io.moderne.hibernate.update40.IndexHqlAnnotationPositionalParameters - Index HQL/JPQL positional parameters in annotations
io.moderne.hibernate.update40.IndexHqlAnnotationPositionalParameters - Index HQL/JPQL positional parameters in annotations
io.moderne.hibernate.update40.IndexHqlAnnotationPositionalParameters - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Index HQL/JPQL positional parameters in method calls
io.moderne.hibernate.update40.IndexHqlMethodPositionalParameters - Replace constant with another constant
org.openrewrite.java.ReplaceConstantWithAnotherConstant - Replace constant with another constant
org.openrewrite.java.ReplaceConstantWithAnotherConstant - Replace constant with another constant
org.openrewrite.java.ReplaceConstantWithAnotherConstant - Replace constant with another constant
org.openrewrite.java.ReplaceConstantWithAnotherConstant - Replace constant with another constant
org.openrewrite.java.ReplaceConstantWithAnotherConstant - Replace constant with another constant
org.openrewrite.java.ReplaceConstantWithAnotherConstant - Replace constant with another constant
org.openrewrite.java.ReplaceConstantWithAnotherConstant
Data tables
Structured output this recipe can produce.
- Source files that had resultsSource files that were modified by the recipe run.
org.openrewrite.table.SourcesFileResults - Source files that had search resultsSearch results that were found during the recipe run.
org.openrewrite.table.SearchResults - Source files that errored on a recipeThe details of all errors produced by a recipe run.
org.openrewrite.table.SourcesFileErrors - Recipe performanceStatistics used in analyzing the performance of recipes.
org.openrewrite.table.RecipeRunStats