Skip to content

Commit

Permalink
Use proper SQLServer dialect for Hibernate 6+
Browse files Browse the repository at this point in the history
This commit fixes the Hibernate dialect lookup for SQLServer as it was
previously using a dialect that has been deprecated. In recent
versions, the standard SQLServerDialect is the one we should be using.

Closes gh-31896
  • Loading branch information
snicoll committed Dec 26, 2023
1 parent 4c6ca05 commit 699f93f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.hibernate.dialect.OracleDialect;
import org.hibernate.dialect.PostgreSQL95Dialect;
import org.hibernate.dialect.SQLServer2012Dialect;
import org.hibernate.dialect.SQLServerDialect;
import org.hibernate.dialect.SybaseDialect;
import org.hibernate.resource.jdbc.spi.PhysicalConnectionHandlingMode;

Expand Down Expand Up @@ -205,7 +206,7 @@ protected Class<?> determineDatabaseDialectClass(Database database) {
case MYSQL -> MySQLDialect.class;
case ORACLE -> OracleDialect.class;
case POSTGRESQL -> org.hibernate.dialect.PostgreSQLDialect.class;
case SQL_SERVER -> SQLServer2012Dialect.class;
case SQL_SERVER -> SQLServerDialect.class;
case SYBASE -> SybaseDialect.class;
default -> null;
};
Expand Down

0 comments on commit 699f93f

Please sign in to comment.