mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-17 22:56:28 +00:00
#1342 - Refactor and rename DbTypeConfig to Platform config to support multi-platform db migration
This commit is contained in:
1 parent
4f327c2751
commit
2042bdf29a
21 files changed
+491
-342
No files matched your search
@@ -267,7 +267,7 @@ public class DefaultContainer implements SpiContainer {
|
||||
config.setDatabasePlatform(platform);
|
||||
}
|
||||
logger.info("DatabasePlatform name:{} platform:{}", config.getName(), platform.getName());
|
||||
platform.configure(config);
|
||||
platform.configure(config.getPlatformConfig());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -304,7 +304,7 @@ public class InternalConfiguration {
|
||||
}
|
||||
|
||||
public RelationalQueryEngine createRelationalQueryEngine() {
|
||||
return new DefaultRelationalQueryEngine(binder, serverConfig.getDatabaseBooleanTrue(), serverConfig.getDbTypeConfig().getDbUuid().useBinaryOptimized());
|
||||
return new DefaultRelationalQueryEngine(binder, serverConfig.getDatabaseBooleanTrue(), serverConfig.getPlatformConfig().getDbUuid().useBinaryOptimized());
|
||||
}
|
||||
|
||||
public OrmQueryEngine createOrmQueryEngine() {
|
||||
|
||||
@@ -8,6 +8,7 @@ import io.ebean.annotation.DbEnumValue;
|
||||
import io.ebean.annotation.EnumValue;
|
||||
import io.ebean.annotation.Platform;
|
||||
import io.ebean.config.JsonConfig;
|
||||
import io.ebean.config.PlatformConfig;
|
||||
import io.ebean.config.ScalarTypeConverter;
|
||||
import io.ebean.config.ServerConfig;
|
||||
import io.ebean.config.dbplatform.DatabasePlatform;
|
||||
@@ -944,7 +945,7 @@ public final class DefaultTypeManager implements TypeManager {
|
||||
nativeMap.put(Types.BIT, booleanType);
|
||||
}
|
||||
|
||||
ServerConfig.DbUuid dbUuid = config.getDbTypeConfig().getDbUuid();
|
||||
PlatformConfig.DbUuid dbUuid = config.getPlatformConfig().getDbUuid();
|
||||
|
||||
if (offlineMigrationGeneration || (databasePlatform.isNativeUuidType() && dbUuid.useNativeType())) {
|
||||
addType(UUID.class, new ScalarTypeUUIDNative());
|
||||
|
||||
Reference in new issue
Block a user