diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java index 2552779c5b..2668c3bef9 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java @@ -1646,20 +1646,10 @@ public interface AvailableSettings { String HBM2DDL_CREATE_SOURCE = "javax.persistence.schema-generation.create-source"; /** - * Specifies whether schema generation commands for schema dropping are to be determined - * based on object/relational mapping metadata, DDL scripts, or a combination of the two. - * See {@link org.hibernate.tool.schema.SourceType} for the list of legal values. - *

- * If no value is specified, a default is inferred as follows: - *

- * + * @deprecated Migrate to {@link #JAKARTA_HBM2DDL_DROP_SOURCE}. * @see org.hibernate.tool.schema.SourceType */ + @Deprecated String HBM2DDL_DROP_SOURCE = "javax.persistence.schema-generation.drop-source"; /** @@ -1937,7 +1927,7 @@ public interface AvailableSettings { * Specifies the DROP script file as either a {@link java.io.Reader} configured for reading * the DDL script file or a string designating a file {@link java.net.URL} for the DDL script. * - * @see #HBM2DDL_DROP_SOURCE + * @see #JAKARTA_HBM2DDL_DROP_SOURCE */ String JAKARTA_HBM2DDL_DROP_SCRIPT_SOURCE = "jakarta.persistence.schema-generation.drop-script-source"; diff --git a/hibernate-core/src/main/java/org/hibernate/tool/schema/SourceType.java b/hibernate-core/src/main/java/org/hibernate/tool/schema/SourceType.java index 6662277f86..2f18409fe7 100644 --- a/hibernate-core/src/main/java/org/hibernate/tool/schema/SourceType.java +++ b/hibernate-core/src/main/java/org/hibernate/tool/schema/SourceType.java @@ -12,8 +12,8 @@ import org.hibernate.cfg.AvailableSettings; * Enumeration of the various types of sources understood by various SchemaManagementTooling * delegates. * - * @see AvailableSettings#HBM2DDL_CREATE_SOURCE - * @see AvailableSettings#HBM2DDL_DROP_SOURCE + * @see AvailableSettings#JAKARTA_HBM2DDL_CREATE_SOURCE + * @see AvailableSettings#JAKARTA_HBM2DDL_DROP_SOURCE * * @author Steve Ebersole */ diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/schemagen/JpaSchemaGeneratorTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/schemagen/JpaSchemaGeneratorTest.java index 29e53af068..1e17a47c03 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/schemagen/JpaSchemaGeneratorTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/schemagen/JpaSchemaGeneratorTest.java @@ -89,7 +89,7 @@ public class JpaSchemaGeneratorTest extends EntityManagerFactoryBasedFunctionalT @TestForIssue(jiraKey = "HHH-8271") public void testSqlDropScriptSourceClasspath() { Map settings = buildSettings(); - settings.put( AvailableSettings.HBM2DDL_DROP_SOURCE, "metadata-then-script" ); + settings.put( AvailableSettings.JAKARTA_HBM2DDL_DROP_SOURCE, "metadata-then-script" ); settings.put( AvailableSettings.JAKARTA_HBM2DDL_DATABASE_ACTION, "drop" ); settings.put( AvailableSettings.HBM2DDL_DROP_SCRIPT_SOURCE, getDropSqlScript() ); doTest( settings ); @@ -99,7 +99,7 @@ public class JpaSchemaGeneratorTest extends EntityManagerFactoryBasedFunctionalT @TestForIssue(jiraKey = "HHH-8271") public void testSqlDropScriptSourceUrl() { Map settings = buildSettings(); - settings.put( AvailableSettings.HBM2DDL_DROP_SOURCE, "metadata-then-script" ); + settings.put( AvailableSettings.JAKARTA_HBM2DDL_DROP_SOURCE, "metadata-then-script" ); settings.put( AvailableSettings.JAKARTA_HBM2DDL_DATABASE_ACTION, "drop" ); settings.put( AvailableSettings.HBM2DDL_DROP_SCRIPT_SOURCE, getResourceUrlString( getDropSqlScript() ) ); doTest( settings );