Skip to content

Doc: hibernate.dialect_resolvers vs HibernateJpaVendorAdapter.setDatabase [SPR-16428] #20974

Closed
@spring-projects-issues

Description

@spring-projects-issues

Giovanni Lovato opened SPR-16428 and commented

Hibernate property hibernate.dialect_resolvers let specify custom Dialect resolvers if no hibernate.dialect is set. I cannot get the property to work with Spring Data JPA and debugging I've found what I guess is the issue, i.e. HibernateJpaVendorAdapter at Line 130 always sets the dialect property and doing so Hibernate will not take into account the dialect_resolvers property.

if (getDatabasePlatform() != null) {
    jpaProperties.put(AvailableSettings.DIALECT, getDatabasePlatform());
}
else {
    Class<?> databaseDialectClass = determineDatabaseDialectClass(getDatabase());
    if (databaseDialectClass != null) {
        jpaProperties.put(AvailableSettings.DIALECT, databaseDialectClass.getName());
    }
}

Affects: 4.3.14, 5.0.3

Issue Links:

Referenced from: commits e1fa65a, f187ca6

Backported to: 4.3.15

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)status: backportedAn issue that has been backported to maintenance branchestype: taskA general task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions