From 74b4c97552670aaf54a383638687d1a3858bcd79 Mon Sep 17 00:00:00 2001 From: asutosh936 Date: Sat, 16 Feb 2019 15:02:39 -0600 Subject: [PATCH] HHH-13226 : Corrected Typo --- changelog.txt | 2 +- .../userguide/appendices/Configurations.adoc | 6 +++--- .../java/org/hibernate/cfg/AvailableSettings.java | 13 ++++++++++++- .../org/hibernate/tool/schema/internal/Helper.java | 2 +- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/changelog.txt b/changelog.txt index 3330ac2d20..c38c10323d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1941,7 +1941,7 @@ https://hibernate.atlassian.net/projects/HHH/versions/22050 * [HHH-10223] - Element 'query-param' in *.hbm.xml files causes ClassCastException * [HHH-10252] - Cascade delete does not work for instrumented/enhanced entities * [HHH-10286] - SessionFactoryImpl doesn't cache and reuse existing collection cache region access strategies - * [HHH-10298] - Add new configuration type hibernate.hbm2dll.extra_physical_table_types + * [HHH-10298] - Add new configuration type hibernate.hbm2ddl.extra_physical_table_types * [HHH-10331] - HSQLDialect returns supportsTupleDistinctCounts false which seems wrong * [HHH-10343] - Precision and scale are reversed when using decimal as element in map * [HHH-10344] - Bring transaction invalidation interceptor into Infinispan 2LC diff --git a/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc b/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc index 0760f28239..72195478fc 100644 --- a/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc +++ b/documentation/src/main/asciidoc/userguide/appendices/Configurations.adoc @@ -869,11 +869,11 @@ If the fully-qualified name is given, the implementation must provide a no-arg c + The default value is https://docs.jboss.org/hibernate/orm/{majorMinorVersion}/javadocs/org/hibernate/tool/hbm2ddl/SingleLineSqlCommandExtractor.html[`SingleLineSqlCommandExtractor`]. -`*hibernate.hbm2dll.create_namespaces*` (e.g. `true` or `false` (default value)):: +`*hibernate.hbm2ddl.create_namespaces*` (e.g. `true` or `false` (default value)):: Specifies whether to automatically create also the database schema/catalog. `*javax.persistence.create-database-schemas*` (e.g. `true` or `false` (default value)):: -The JPA variant of `hibernate.hbm2dll.create_namespaces`. Specifies whether the persistence provider is to create the database schema(s) in addition to creating database objects (tables, sequences, constraints, etc). +The JPA variant of `hibernate.hbm2ddl.create_namespaces`. Specifies whether the persistence provider is to create the database schema(s) in addition to creating database objects (tables, sequences, constraints, etc). The value of this boolean property should be set to `true` if the persistence provider is to create schemas in the database or to generate DDL that contains "CREATE SCHEMA" commands. + If this property is not supplied (or is explicitly `false`), the provider should not attempt to create database schemas. @@ -898,7 +898,7 @@ Used to specify the `SchemaManagementTool` to use for performing schema manageme `*hibernate.synonyms*` (e.g. `true` or `false` (default value)):: If enabled, allows schema update and validation to support synonyms. Due to the possibility that this would return duplicate tables (especially in Oracle), this is disabled by default. -`*hibernate.hbm2dll.extra_physical_table_types*` (e.g. `BASE TABLE`):: +`*hibernate.hbm2ddl.extra_physical_table_types*` (e.g. `BASE TABLE`):: Identifies a comma-separated list of values to specify extra table types, other than the default `TABLE` value, to recognize as defining a physical table by schema update, creation and validation. `*hibernate.schema_update.unique_constraint_strategy*` (e.g. `DROP_RECREATE_QUIETLY`, `RECREATE_QUIETLY`, `SKIP`):: 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 b2bfa41678..402e70d07e 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java @@ -1454,6 +1454,17 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings { * * @since 5.0 */ + String HBM2DDL_CREATE_NAMESPACES = "hibernate.hbm2ddl.create_namespaces"; + + + /** + * Specifies whether to automatically create also the database schema/catalog. + * The default is false. + * + * @since 5.0 + * @deprecated + */ + @Deprecated String HBM2DLL_CREATE_NAMESPACES = "hibernate.hbm2dll.create_namespaces"; /** @@ -1670,7 +1681,7 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings { * * @since 5.0 */ - String EXTRA_PHYSICAL_TABLE_TYPES = "hibernate.hbm2dll.extra_physical_table_types"; + String EXTRA_PHYSICAL_TABLE_TYPES = "hibernate.hbm2ddl.extra_physical_table_types"; /** * Unique columns and unique keys both use unique constraints in most dialects. diff --git a/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/Helper.java b/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/Helper.java index 62d0297175..3760bbb747 100644 --- a/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/Helper.java +++ b/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/Helper.java @@ -108,7 +108,7 @@ public class Helper { AvailableSettings.HBM2DLL_CREATE_SCHEMAS, configurationValues, ConfigurationHelper.getBoolean( - AvailableSettings.HBM2DLL_CREATE_NAMESPACES, + AvailableSettings.HBM2DDL_CREATE_NAMESPACES, configurationValues, false )