mirror of
https://github.com/corda/corda.git
synced 2025-03-16 00:55:24 +00:00
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:
parent
a275aec546
commit
cec2f25c67
@ -37,6 +37,8 @@ Unreleased
|
||||
* Fixed node's behaviour on startup when there is no connectivity to network map. Node continues to work normally if it has
|
||||
all the needed network data, waiting in the background for network map to become available.
|
||||
|
||||
* Added `database.hibernateDialect` node configuration option
|
||||
|
||||
.. _changelog_r3_v3:
|
||||
|
||||
R3 Corda 3.0 Developer Preview
|
||||
|
@ -78,6 +78,9 @@ absolute path to the node's base directory.
|
||||
:schema: (optional) some database providers require a schema name when generating DDL and SQL statements.
|
||||
(the value is passed to Hibernate property 'hibernate.default_schema').
|
||||
|
||||
:hibernateDialect: (optional) for explicit definition of ``hibernate.dialect`` property, for most cases Hibernate properly detect
|
||||
the correct value
|
||||
|
||||
:dataSourceProperties: This section is used to configure the jdbc connection and database driver used for the nodes persistence.
|
||||
Currently the defaults in ``/node/src/main/resources/reference.conf`` are as shown in the first example. This is currently
|
||||
the only configuration that has been tested, although in the future full support for other storage layers will be validated.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user