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.