如果本文章解决了你的问题请在空闲时留言让我知道我帮助到了他人
hibernate type=MyISAM的错误
2018年08月23日 15:59:38 jerny2017 阅读数:293
hibernate.cfg.xml配置了下面语句后:
<property name="hibernate.hbm2ddl.auto">update</property>
会通过hbm生成一个sql语句来创建表,
如果配置了下面的语句:
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
而且你使用的mysql是5.x,那么会报错: type=MyISAM
解决方法是:
配置改成:
<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
MySQL5Dialect: An SQL dialect for MySQL 5.x specific features.