From c8111fc75390e04d9d03cfd1834b2bae79d60a1f Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Tue, 7 Mar 2023 19:59:45 +0000 Subject: [PATCH] HHH-16223 Avoid using legacy HBM2DDL_CONNECTION --- .../jpa/schemagen/SchemaDatabaseFileGenerationFailureTest.java | 2 +- .../schema/IndividuallySchemaValidatorImplConnectionTest.java | 2 +- .../java/org/hibernate/testing/schema/SchemaCreateHelper.java | 2 +- .../java/org/hibernate/testing/schema/SchemaDropHelper.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/schemagen/SchemaDatabaseFileGenerationFailureTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/schemagen/SchemaDatabaseFileGenerationFailureTest.java index a38cdfcf67..7d94510187 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/schemagen/SchemaDatabaseFileGenerationFailureTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/schemagen/SchemaDatabaseFileGenerationFailureTest.java @@ -118,7 +118,7 @@ public class SchemaDatabaseFileGenerationFailureTest { private Map getConfig() { final Map config = Environment.getProperties(); - config.put( AvailableSettings.HBM2DDL_CONNECTION, connection ); + config.put( AvailableSettings.JAKARTA_HBM2DDL_CONNECTION, connection ); config.put( AvailableSettings.JAKARTA_HBM2DDL_DATABASE_ACTION, "drop" ); config.put( AvailableSettings.HBM2DDL_HALT_ON_ERROR, true ); ArrayList classes = new ArrayList<>(); diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/IndividuallySchemaValidatorImplConnectionTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/IndividuallySchemaValidatorImplConnectionTest.java index 938f4d3a74..d2b42a8476 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/IndividuallySchemaValidatorImplConnectionTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/IndividuallySchemaValidatorImplConnectionTest.java @@ -90,7 +90,7 @@ public class IndividuallySchemaValidatorImplConnectionTest extends BaseUnitTestC connection = connectionProvider.getConnection(); ssr = new StandardServiceRegistryBuilder() - .applySetting( AvailableSettings.HBM2DDL_CONNECTION, connection ) + .applySetting( AvailableSettings.JAKARTA_HBM2DDL_CONNECTION, connection ) .build(); tool = (HibernateSchemaManagementTool) ssr.getService( SchemaManagementTool.class ); diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/schema/SchemaCreateHelper.java b/hibernate-testing/src/main/java/org/hibernate/testing/schema/SchemaCreateHelper.java index 4502ad28ed..410d9ecb21 100644 --- a/hibernate-testing/src/main/java/org/hibernate/testing/schema/SchemaCreateHelper.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/schema/SchemaCreateHelper.java @@ -61,7 +61,7 @@ public class SchemaCreateHelper { Connection connection) { final Map settings = serviceRegistry.getService( ConfigurationService.class ).getSettings(); settings.put( AvailableSettings.JAKARTA_HBM2DDL_DATABASE_ACTION, Action.CREATE ); - settings.put( AvailableSettings.HBM2DDL_CONNECTION, connection ); + settings.put( AvailableSettings.JAKARTA_HBM2DDL_CONNECTION, connection ); SchemaManagementToolCoordinator.process( metadata, serviceRegistry, diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/schema/SchemaDropHelper.java b/hibernate-testing/src/main/java/org/hibernate/testing/schema/SchemaDropHelper.java index d6b7163d20..569e76e3d1 100644 --- a/hibernate-testing/src/main/java/org/hibernate/testing/schema/SchemaDropHelper.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/schema/SchemaDropHelper.java @@ -47,7 +47,7 @@ public class SchemaDropHelper { Connection connection) { final Map settings = serviceRegistry.getService( ConfigurationService.class ).getSettings(); settings.put( AvailableSettings.JAKARTA_HBM2DDL_DATABASE_ACTION, Action.DROP ); - settings.put( AvailableSettings.HBM2DDL_CONNECTION, connection ); + settings.put( AvailableSettings.JAKARTA_HBM2DDL_CONNECTION, connection ); SchemaManagementToolCoordinator.process( metadata, serviceRegistry,