HHH-11808 - Update migration guide and documentation
This commit is contained in:
parent
2b809c475c
commit
cf88522a31
|
@ -607,7 +607,8 @@ Used to specify the `org.hibernate.tool.schema.spi.SchemaFilterProvider` to be u
|
|||
Setting to choose the strategy used to access the JDBC Metadata.
|
||||
Valid options are defined by the `strategy` value of the `org.hibernate.tool.schema.JdbcMetadaAccessStrategy` enum:
|
||||
|
||||
`grouped`:: `org.hibernate.tool.schema.spi.SchemaMigrator` and `org.hibernate.tool.schema.spi.SchemaValidator` execute a single `java.sql.DatabaseMetaData#getTables(String, String, String, String[])` call to retrieve all the database table in order to determine if all the `javax.persistence.Entity` have a corresponding mapped database tables.
|
||||
`grouped`:: `org.hibernate.tool.schema.spi.SchemaMigrator` and `org.hibernate.tool.schema.spi.SchemaValidator` execute a single `java.sql.DatabaseMetaData#getTables(String, String, String, String[])` call to retrieve all the database table in order to determine if all the `javax.persistence.Entity` have a corresponding mapped database tables. This strategy may require `hibernate.default_schema` and/or `hibernate.default_catalog` to be provided.
|
||||
|
||||
`individually`:: `org.hibernate.tool.schema.spi.SchemaMigrator` and `org.hibernate.tool.schema.spi.SchemaValidator` execute one `java.sql.DatabaseMetaData#getTables(String, String, String, String[])` call for each `javax.persistence.Entity` in order to determine if a corresponding database table exists.
|
||||
|
||||
|`hibernate.hbm2ddl.delimiter` | `;` |Identifies the delimiter to use to separate schema management statements in script outputs.
|
||||
|
|
|
@ -1087,6 +1087,8 @@ public interface AvailableSettings {
|
|||
*
|
||||
* Valid options are defined by the {@link JdbcMetadaAccessStrategy} enum.
|
||||
*
|
||||
* {@link JdbcMetadaAccessStrategy#GROUPED} is the default value.
|
||||
*
|
||||
* @see JdbcMetadaAccessStrategy
|
||||
*/
|
||||
String HBM2DDL_JDBC_METADATA_EXTRACTOR_STRATEGY = "hibernate.hbm2ddl.jdbc_metadata_extraction_strategy";
|
||||
|
|
|
@ -24,6 +24,9 @@ public enum JdbcMetadaAccessStrategy {
|
|||
* The {@link org.hibernate.tool.schema.spi.SchemaMigrator} and {@link org.hibernate.tool.schema.spi.SchemaValidator}
|
||||
* execute a single {@link java.sql.DatabaseMetaData#getTables(String, String, String, String[])} call
|
||||
* to retrieve all the database table in order to determine all the {@link javax.persistence.Entity} have a mapped database tables.
|
||||
*
|
||||
* This strategy is the default one and it may require {@link AvailableSettings#DEFAULT_CATALOG} and/or
|
||||
* {@link AvailableSettings#DEFAULT_SCHEMA} values to be provided.
|
||||
*/
|
||||
GROUPED( "grouped" );
|
||||
|
||||
|
|
|
@ -32,3 +32,12 @@ These changes will only be a migration concern for applications directly using a
|
|||
* `org.hibernate.tool.hbm2ddl.SchemaValidator`
|
||||
* `org.hibernate.tool.schema.spi.SchemaManagementTool` or any of its delegates
|
||||
|
||||
|
||||
In 5.1.4, a new strategy for retrieving database tables was introduced that improves SchemaMigrator and SchemaValidator
|
||||
performance. This strategy executes a single `java.sql.DatabaseMetaData#getTables(String, String, String, String[])`
|
||||
call to determine if each `javax.persistence.Entity` has a mapped database table.
|
||||
This strategy is the default, and uses the property setting `hibernate.hbm2ddl.jdbc_metadata_extraction_strategy=grouped`.
|
||||
This strategy may require `hibernate.default_schema` and/or `hibernate.default_catalog` to be provided.
|
||||
|
||||
To use the old strategy, which executes a `java.sql.DatabaseMetaData#getTables(String, String, String, String[])` call for
|
||||
each javax.persistence.Entity, use the property setting `hibernate.hbm2ddl.jdbc_metadata_extraction_strategy=individually`.
|
||||
|
|
Loading…
Reference in New Issue