Search code examples
mysqlsqlhibernatejpaddl

Hibernate add 'type=MyISAM' in a table creation with JPA


I launched my app with JPA and it suppose to create me some tables. The problem is that Hibernate added some extra SQL code ('type=MyISAM').

org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create table person (id integer not null auto_increment, name varchar(255), uuid binary(255), primary key (id)) type=MyISAM" via JDBC Statement

Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=MyISAM' at line 1

I have any idea what is 'type=MyISAM' that hibernate added to SQL queries...

Anybody here know what is it about ?


Solution

  • it is a DB dialect problem.

    if you are using mysql database then you please add below property key in your application.properties file:--

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