我尝试使用 spring 在我的项目中将 hibernate 从 4 升级到 54.2
版本。升级后,当我调用更新方法时,我在堆栈跟踪中发现以下错误。
10:53:32,185 ERROR TableStructure:149 - could not read a hi value
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'test.hibernate_sequence' doesn't exist
我用注释更改了自动递增的 Id
@GeneratedValue(strategy=GenerationType.AUTO)
错误仍然存在。
您还可以输入:
@GeneratedValue(strategy = GenerationType.IDENTITY)
并让DataBase管理主键的增量:
AUTO_INCREMENT PRIMARY KEY
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)