Hugo Bois
Hugo Bois

Reputation: 141

Using community dialects from Hibernate core

Context - I need to run Hibernate core tests on 6.x version with PostgreSQL92 dialect. Starting Hibernate 6.x version, legacy dialects were moved to hibernate-community-dialects subproject, which is included by default in settings.gradle file. (GitHub repo)

Situation - I have wired my database in gradle/databases.gradle correctly (working like a charm with default PostgreSQLDialect). I run my tests using gradle hibernate-core:test from project root.

pgsql : [
    'db.dialect' : 'org.hibernate.community.dialect.PostgreSQL92Dialect', // community dialect
    'jdbc.driver': 'org.postgresql.Driver',
    'jdbc.user'  : 'my_user',
    'jdbc.pass'  : 'my_pass',
    'jdbc.url'   : 'jdbc:postgresql://myHost/myDatabase,
    'jdbc.datasource' : 'org.postgresql.Driver'
],

Problem - None of the community dialects is found while running tests.

Analysis - If I get the workflow right, we have:

So we should have legacy dialects available in classpath when running test goal on hibernate-core, or am I missing something?

Upvotes: 1

Views: 223

Answers (0)

Related Questions