How can we resolve a DataIntegrityViolationException in Spring Hibernate?

I use Spring Hibernate with HibernateSupportDao, when I try to send several rows of data for storage in my db, it raises DataIntegrityViolationExceptionin a specific row. The same scenario remained in the task in the same table. I do not understand, even when I use the same code for the current task. Why was thrown out DataIntegrityViolationExceptionand how can I fix it?

+5
source share
5 answers

Directly from the API :

, , . , ; .

, hibernate - , . , , .

(, )?

+6

, select. . .

+2

DataIntegrityViolationException (.. ). , , .

+1

-, .

0

I am handling a DataIntegrityViolationException in an ExceptionInfoHandler, detecting database entries in the root cause message and converting it to i18n message through the map. See the code here: fooobar.com/questions/437105 / ...

0
source

All Articles