休眠序列不存在

rParvathi:

我尝试在春季4.2版本的项目中将休眠模式从4升级到5 升级之后,我在调用更新方法时在堆栈跟踪中发现以下错误。

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) 

错误仍然存​​在。

rParvathi:

您需要设置Hibernate5.x <property name="hibernate.id.new_generator_mappings">false</property>..参见并链接

对于较早版本的hibernate 4.x: <prop key="hibernate.id.new_generator_mappings">false</prop>

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章