Versioned dialects are replaced with an unified dialect since 6.0 and removed since 6.2 This commit fix ClassNotFoundException for hibernate 6.2 Fix GH-30488
Comment From: mdeinum
I doubt not setting it for 6.2 is the actual solution, but rather select the different class for 6.2 would be better imho (this would probably require some additional dynamic trickery for determining which class to use, due to classloading etc.).
Comment From: quaff
I doubt not setting it for 6.2 is the actual solution, but rather select the different class for 6.2 would be better imho (this would probably require some additional dynamic trickery for determining which class to use, due to classloading etc.).
Hibernate's automatic dialect resolution is more sophisticated than HibernateJpaVendorAdapter.determineDatabaseDialectClass()
, I can't understand why spring do that, maybe it's workaround for old versions, we should rethink it now.
Comment From: mdeinum
It will only do that if spring.jpa.database
is set, if not set it won't do anything nor set anything. Next to that there are situations in which the hibernate.dialect
is required else it won't even startup (there are many StackOverflow questions regarding this).
Comment From: snicoll
Thanks both. Given that this only apply if we set the property, I am not keen to merge this. Just don't set these and Hibernate's defaults will apply. I wondered about deprecating those properties though but it looks like we're not there yet.