如何在Spring Hibernate中解决DataIntegrityViolationException? [英] How can we solve the DataIntegrityViolationException in Spring Hibernate?
本文介绍了如何在Spring Hibernate中解决DataIntegrityViolationException?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将Spring Hibernate与HibernateSupportDao一起使用,当我尝试发送多行数据以存储在我的数据库中时,它在特定行上引发了DataIntegrityViolationException
.相同的方案在保留在同一表的任务中起作用.即使我为当前任务使用相同的代码,我也没有遇到问题.为什么会抛出DataIntegrityViolationException
,我该如何纠正?
I am using Spring Hibernate with HibernateSupportDao, when I try to send multiple rows of data to store in my db, it raises a DataIntegrityViolationException
at a particular row. The same scenario has worked in remain in task on the same table. I do not get the problem even when I use the same code for the current task. Why was a DataIntegrityViolationException
thrown and how can I rectify that?
推荐答案
查看全文