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

Viewed 1039

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 ?

2 Answers

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

... and for MySQL 8

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

Related