错误提示:
Exception in thread "main" org.hibernate.exception.ConstraintViolationException: could not insert: [com.Hibernate.Ppp]
解决方法:
修改,删除都正确 但是插入一条数据就报错!
是ID generator的事情 改成increment就没事了! :lol:
Exception in thread "main" org.hibernate.exception.ConstraintViolationException: could not insert: [com.Hibernate.Ppp]
解决方法:
修改,删除都正确 但是插入一条数据就报错!
是ID generator的事情 改成increment就没事了! :lol:
解决Hibernate插入数据时出现ConstraintViolationException异常的问题。通过将ID生成策略从默认设置更改为increment,成功避免了在插入新记录时违反唯一性约束的情况。
2141

被折叠的 条评论
为什么被折叠?



