标签:color mysql5.0 ber mysq strong could not could pre ram
本质原因:配置的Java Bean,由Hibernate自动产生的SQL语句中有语法错误
原因如下:
情况1.存在字段名/表名与数据库关键字冲突
情况2.MySQL5.0以后与MySQL5.0以前事务引擎InnoDB配置微妙不同
解决方案:
//MySQL 5.0之后【engine = InnoDB】 <property name="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property> //NySQL 5.0之前【type = InnoDB】 <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
Java EE 之 Hibernate异常解决:org.hibernate.exception.SQLGrammarException: could not execute statement
标签:color mysql5.0 ber mysq strong could not could pre ram
原文地址:https://www.cnblogs.com/cx-code/p/9378384.html