HHH-8503 invoke determineDialect instead of constructDialect when
hibernate.dialect is blank
This commit is contained in:
parent
3740a5b37b
commit
a5e00f3201
|
@ -29,6 +29,7 @@ import java.sql.SQLException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.hibernate.HibernateException;
|
import org.hibernate.HibernateException;
|
||||||
|
import org.hibernate.annotations.common.util.StringHelper;
|
||||||
import org.hibernate.boot.registry.selector.spi.StrategySelector;
|
import org.hibernate.boot.registry.selector.spi.StrategySelector;
|
||||||
import org.hibernate.cfg.AvailableSettings;
|
import org.hibernate.cfg.AvailableSettings;
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
|
@ -59,7 +60,7 @@ public class DialectFactoryImpl implements DialectFactory {
|
||||||
@Override
|
@Override
|
||||||
public Dialect buildDialect(Map configValues, Connection connection) throws HibernateException {
|
public Dialect buildDialect(Map configValues, Connection connection) throws HibernateException {
|
||||||
final String dialectName = (String) configValues.get( AvailableSettings.DIALECT );
|
final String dialectName = (String) configValues.get( AvailableSettings.DIALECT );
|
||||||
if ( dialectName != null ) {
|
if ( StringHelper.isEmpty( dialectName ) ) {
|
||||||
return constructDialect( dialectName );
|
return constructDialect( dialectName );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue