报错:org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or un

报错:

org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect):

分析:

timestamp的字段一定要有值,并且是日期值,否则hibernate报错

解决:


把实体类中timestamp字段的注解由@Version改为@Temporal(TemporalType.DATE)

发布了110 篇原创文章 · 获赞 25 · 访问量 16万+

猜你喜欢

转载自blog.csdn.net/qq_32117641/article/details/105622810