Migrate Hibernate dialect to the generic dialect
Recipe ID
org.openrewrite.hibernate.MigrateDialectArtifactorg.openrewrite.recipe:rewrite-hibernateMigrate all Hibernate version-specific dialect classes to their generic equivalents. Version-specific dialects were deprecated in Hibernate 6.0 and removed in Hibernate 6.2.
Composite recipeMSAL
Add to your build
Get a download tokenThis recipe is Moderne licensed, so the token must belong to a Moderne customer. It replaces YOUR_DOWNLOAD_TOKEN below.
~/.gradle/gradle.properties
codeGenomeUsername=you@example.com
codeGenomeToken=YOUR_DOWNLOAD_TOKEN
build.gradle.kts
plugins {
id("org.openrewrite.rewrite") version("latest.release")
}
rewrite {
activeRecipe("org.openrewrite.hibernate.MigrateDialect")
}
repositories {
mavenCentral()
maven {
url = uri("https://artifacts.codegenomeproject.org/maven")
credentials {
username = providers.gradleProperty("codeGenomeUsername").get()
password = providers.gradleProperty("codeGenomeToken").get()
}
}
}
dependencies {
rewrite("org.openrewrite.recipe:rewrite-hibernate:2.26.1")
}
Then run
./gradlew rewriteRunUsage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.hibernate.MigrateDialectIf the recipe isn’t available locally, install it with:
mod config recipes jar install org.openrewrite.recipe:rewrite-hibernate:RELEASEDefinition
This recipe runs the following recipes in order.
- Change type
MySQL5DialecttoMySQLDialectorg.openrewrite.java.ChangeType - Change type
MySQL55DialecttoMySQLDialectorg.openrewrite.java.ChangeType - Change type
MySQL57DialecttoMySQLDialectorg.openrewrite.java.ChangeType - Change type
MySQL8DialecttoMySQLDialectorg.openrewrite.java.ChangeType - Change type
MariaDB53DialecttoMariaDBDialectorg.openrewrite.java.ChangeType - Change type
MariaDB10DialecttoMariaDBDialectorg.openrewrite.java.ChangeType - Change type
MariaDB102DialecttoMariaDBDialectorg.openrewrite.java.ChangeType - Change type
MariaDB103DialecttoMariaDBDialectorg.openrewrite.java.ChangeType - Change type
PostgreSQL81DialecttoPostgreSQLDialectorg.openrewrite.java.ChangeType - Change type
PostgreSQL82DialecttoPostgreSQLDialectorg.openrewrite.java.ChangeType - Change type
PostgreSQL9DialecttoPostgreSQLDialectorg.openrewrite.java.ChangeType - Change type
PostgreSQL91DialecttoPostgreSQLDialectorg.openrewrite.java.ChangeType - Change type
PostgreSQL92DialecttoPostgreSQLDialectorg.openrewrite.java.ChangeType - Change type
PostgreSQL93DialecttoPostgreSQLDialectorg.openrewrite.java.ChangeType - Change type
PostgreSQL94DialecttoPostgreSQLDialectorg.openrewrite.java.ChangeType - Change type
PostgreSQL95DialecttoPostgreSQLDialectorg.openrewrite.java.ChangeType - Change type
PostgreSQL10DialecttoPostgreSQLDialectorg.openrewrite.java.ChangeType - Change type
Oracle8iDialecttoOracleDialectorg.openrewrite.java.ChangeType - Change type
Oracle9iDialecttoOracleDialectorg.openrewrite.java.ChangeType - Change type
Oracle10gDialecttoOracleDialectorg.openrewrite.java.ChangeType - Change type
Oracle12cDialecttoOracleDialectorg.openrewrite.java.ChangeType - Change type
SQLServer2005DialecttoSQLServerDialectorg.openrewrite.java.ChangeType - Change type
SQLServer2008DialecttoSQLServerDialectorg.openrewrite.java.ChangeType - Change type
SQLServer2012DialecttoSQLServerDialectorg.openrewrite.java.ChangeType - Change type
SQLServer2016DialecttoSQLServerDialectorg.openrewrite.java.ChangeType
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