2
HHH90000026: MySQL8Dialect has been deprecated; use org.hibernate.dialect.MySQLDialect instead

In SpringBoot 3 + Hibernate 6, MySQL8Dialect is deprecated in favor of MySQLDialect

the problem is that MySQLDialect requires to set constructor parameter which version to use.

So,

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect(8)

isn't working.

And

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect 

will use default version which is 5.0.

How to specify version 8 with using

spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect 

?

Brian Clozel
  • 56,583
  • 15
  • 167
  • 176
  • 1
    I had a similar experience with OracleDialect. My solution was to remove the dialect configuration altogether and let "hibernate decide" what it wants to use. For my case with H2 or Oracle it works quite well. – Knoobie Jun 10 '23 at 10:18
  • without dialect - org.hibernate.HibernateException: Unable to determine Dialect without JDBC metadata (please set 'javax.persistence.jdbc.url', 'hibernate.connection.url', or 'hibernate.dialect') It wouldn't be problem if it would be pure hibernate app. in spring boot we need to setup spring.datasource.url – Sergio Lissner Jun 11 '23 at 20:13

0 Answers0