ENT-1627 - Allow to set hibernate.dialect setting for pluggable database (#687)

Optional property `database.hibernateDialect` which maps to `hibernate.dialect`.
This commit is contained in:
szymonsztuka
2018-04-26 19:05:55 +01:00
committed by GitHub
parent a275aec546
commit cec2f25c67
4 changed files with 10 additions and 1 deletions

View File

@ -35,7 +35,8 @@ data class DatabaseConfig(
val runMigration: Boolean = false,
val transactionIsolationLevel: TransactionIsolationLevel = TransactionIsolationLevel.REPEATABLE_READ,
val schema: String? = null,
val exportHibernateJMXStatistics: Boolean = false
val exportHibernateJMXStatistics: Boolean = false,
val hibernateDialect: String? = null
)
// This class forms part of the node config and so any changes to it must be handled with care

View File

@ -90,6 +90,9 @@ class HibernateConfiguration(
}
config.setProperty("hibernate.default_schema", schemaName)
}
databaseConfig.hibernateDialect?.apply {
config.setProperty("hibernate.dialect", this)
}
schemas.forEach { schema ->
// TODO: require mechanism to set schemaOptions (databaseSchema, tablePrefix) which are not global to session