mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-06 00:32:18 +00:00
#867 - ENH: Add ability to globally use quoted identifiers on all tables and columns
This commit is contained in:
1 parent
15be31fd5f
commit
e49c4bfe5a
9 files changed
+127
-29
No files matched your search
@@ -244,17 +244,17 @@ public class DefaultContainer implements SpiContainer {
|
||||
*/
|
||||
private void setDatabasePlatform(ServerConfig config) {
|
||||
|
||||
DatabasePlatform dbPlatform = config.getDatabasePlatform();
|
||||
if (dbPlatform == null) {
|
||||
DatabasePlatform platform = config.getDatabasePlatform();
|
||||
if (platform == null) {
|
||||
if (config.getTenantMode().isDynamicDataSource()) {
|
||||
throw new IllegalStateException("DatabasePlatform must be explicitly set on ServerConfig for TenantMode "+config.getTenantMode());
|
||||
}
|
||||
DatabasePlatformFactory factory = new DatabasePlatformFactory();
|
||||
DatabasePlatform db = factory.create(config);
|
||||
db.configure(config.getDbTypeConfig());
|
||||
config.setDatabasePlatform(db);
|
||||
logger.info("DatabasePlatform name:{} platform:{}", config.getName(), db.getName());
|
||||
// automatically determine the platform
|
||||
platform = new DatabasePlatformFactory().create(config);
|
||||
config.setDatabasePlatform(platform);
|
||||
}
|
||||
logger.info("DatabasePlatform name:{} platform:{}", config.getName(), platform.getName());
|
||||
platform.configure(config.getDbTypeConfig(), config.isAllQuotedIdentifiers());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user