Skip to content

Commit

Permalink
HibernateTypesContributor does not register Types on Hibernate 5 and …
Browse files Browse the repository at this point in the history
…4 for Oracle, SQL Server, and PostgreSQL #441
  • Loading branch information
SergeiKhmelevSPA authored and vladmihalcea committed Jun 3, 2022
1 parent b54dbba commit f56bf28
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Expand Up @@ -30,7 +30,7 @@ public void contribute(TypeContributions typeContributions, ServiceRegistry serv
JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class);
Dialect dialect = jdbcServices.getDialect();

if(dialect instanceof PostgreSQLDialect) {
if(dialect instanceof PostgreSQL82Dialect) {
/* Arrays */
this
.contributeType(typeContributions, BooleanArrayType.INSTANCE)
Expand Down Expand Up @@ -62,11 +62,11 @@ public void contribute(TypeContributions typeContributions, ServiceRegistry serv
this
.contributeType(typeContributions, JsonStringType.INSTANCE)
.contributeType(typeContributions, JsonNodeStringType.INSTANCE);
} else if(dialect instanceof SQLServerDialect) {
} else if(dialect instanceof SQLServer2005Dialect) {
/* JSON */
this
.contributeType(typeContributions, JsonStringType.INSTANCE);
} else if(dialect instanceof OracleDialect) {
} else if(dialect instanceof Oracle8iDialect) {
/* Date/Time */
this
/* JSON */
Expand Down
Expand Up @@ -31,7 +31,7 @@ public void contribute(TypeContributions typeContributions, ServiceRegistry serv
JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class);
Dialect dialect = jdbcServices.getDialect();

if(dialect instanceof PostgreSQLDialect) {
if(dialect instanceof PostgreSQL82Dialect) {
/* Arrays */
this
.contributeType(typeContributions, BooleanArrayType.INSTANCE)
Expand Down Expand Up @@ -69,11 +69,11 @@ public void contribute(TypeContributions typeContributions, ServiceRegistry serv
this
.contributeType(typeContributions, JsonStringType.INSTANCE)
.contributeType(typeContributions, JsonNodeStringType.INSTANCE);
} else if(dialect instanceof SQLServerDialect) {
} else if(dialect instanceof SQLServer2005Dialect) {
/* JSON */
this
.contributeType(typeContributions, JsonStringType.INSTANCE);
} else if(dialect instanceof OracleDialect) {
} else if(dialect instanceof Oracle8iDialect) {
/* Date/Time */
this
.contributeType(typeContributions, OracleIntervalDayToSecondType.INSTANCE)
Expand Down
Expand Up @@ -31,7 +31,7 @@ public void contribute(TypeContributions typeContributions, ServiceRegistry serv
JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class);
Dialect dialect = jdbcServices.getDialect();

if(dialect instanceof PostgreSQLDialect) {
if(dialect instanceof PostgreSQL82Dialect) {
/* Arrays */
this
.contributeType(typeContributions, BooleanArrayType.INSTANCE)
Expand Down Expand Up @@ -69,11 +69,11 @@ public void contribute(TypeContributions typeContributions, ServiceRegistry serv
this
.contributeType(typeContributions, JsonStringType.INSTANCE)
.contributeType(typeContributions, JsonNodeStringType.INSTANCE);
} else if(dialect instanceof SQLServerDialect) {
} else if(dialect instanceof SQLServer2005Dialect) {
/* JSON */
this
.contributeType(typeContributions, JsonStringType.INSTANCE);
} else if(dialect instanceof OracleDialect) {
} else if(dialect instanceof Oracle8iDialect) {
/* Date/Time */
this
.contributeType(typeContributions, OracleIntervalDayToSecondType.INSTANCE)
Expand Down

0 comments on commit f56bf28

Please sign in to comment.