Rename AvailbaleSetting JAKARTA_DIALECT_DB_VERSION to JAKARTA_HBM2DDL_DB_VERSION and fix its values
This commit is contained in:
parent
60b3d4ec8f
commit
05b2ca3b83
|
@ -1831,7 +1831,7 @@ public interface AvailableSettings extends org.hibernate.jpa.AvailableSettings {
|
|||
*
|
||||
* @see #DIALECT_DB_NAME
|
||||
*/
|
||||
String JAKARTA_DIALECT_DB_VERSION = "javax.persistence.database-product-version";
|
||||
String JAKARTA_HBM2DDL_DB_VERSION = "jakarta.persistence.database-product-version";
|
||||
|
||||
/**
|
||||
* Specifies the major version of the underlying database, as would be returned by
|
||||
|
|
|
@ -57,7 +57,7 @@ import static org.hibernate.cfg.AvailableSettings.HBM2DDL_CONNECTION;
|
|||
import static org.hibernate.cfg.AvailableSettings.HBM2DDL_DB_MAJOR_VERSION;
|
||||
import static org.hibernate.cfg.AvailableSettings.HBM2DDL_DB_MINOR_VERSION;
|
||||
import static org.hibernate.cfg.AvailableSettings.HBM2DDL_DELIMITER;
|
||||
import static org.hibernate.cfg.AvailableSettings.JAKARTA_DIALECT_DB_VERSION;
|
||||
import static org.hibernate.cfg.AvailableSettings.JAKARTA_HBM2DDL_DB_VERSION;
|
||||
import static org.hibernate.cfg.AvailableSettings.JAKARTA_HBM2DDL_CONNECTION;
|
||||
import static org.hibernate.cfg.AvailableSettings.JAKARTA_HBM2DDL_DB_MAJOR_VERSION;
|
||||
import static org.hibernate.cfg.AvailableSettings.JAKARTA_HBM2DDL_DB_MINOR_VERSION;
|
||||
|
@ -245,11 +245,11 @@ public class HibernateSchemaManagementTool implements SchemaManagementTool, Serv
|
|||
);
|
||||
if ( dbName != null ) {
|
||||
final String dbVersion = (String) coalesceSuppliedValues(
|
||||
() -> configurationValues.get( JAKARTA_DIALECT_DB_VERSION ),
|
||||
() -> configurationValues.get( JAKARTA_HBM2DDL_DB_VERSION ),
|
||||
() -> {
|
||||
final String name = (String) configurationValues.get( DIALECT_DB_VERSION );
|
||||
if ( StringHelper.isNotEmpty( name ) ) {
|
||||
DEPRECATION_LOGGER.deprecatedSetting( DIALECT_DB_VERSION, JAKARTA_DIALECT_DB_VERSION );
|
||||
DEPRECATION_LOGGER.deprecatedSetting( DIALECT_DB_VERSION, JAKARTA_HBM2DDL_DB_VERSION );
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue