Added support to specify dialect for JPA

This commit is contained in:
Stian Thorgersen 2014-07-18 11:32:09 +01:00
parent 85621bdd9f
commit fb8483dc56
2 changed files with 6 additions and 0 deletions

View file

@ -69,6 +69,11 @@ public class DefaultJpaConnectionProviderFactory implements JpaConnectionProvide
properties.put(AvailableSettings.JDBC_URL, config.get("url"));
properties.put(AvailableSettings.JDBC_DRIVER, config.get("driver"));
String driverDialect = config.get("driverDialect");
if (driverDialect != null && driverDialect.length() > 0) {
properties.put("hibernate.dialect", driverDialect);
}
String user = config.get("user");
if (user != null) {
properties.put(AvailableSettings.JDBC_USER, user);

View file

@ -60,6 +60,7 @@
"default": {
"url": "${keycloak.connectionsJpa.url:jdbc:h2:mem:test}",
"driver": "${keycloak.connectionsJpa.driver:org.h2.Driver}",
"driverDialect": "${keycloak.connectionsJpa.driverDialect:}",
"user": "${keycloak.connectionsJpa.user:sa}",
"password": "${keycloak.connectionsJpa.password:}",
"databaseSchema": "${keycloak.connectionsJpa.databaseSchema:create-drop}"