Cannot delete or update a parent row: a foreign key constraint fails (`webappCRUD`.`address`, CONSTRAINT `FK6xl51eidwyq9xksr5b66bkq9p` FOREIGN KEY (`addresses`) REFERENCES `user` (`id`))
ivanlp10n2 opened this issue · comments
When deleting a user I get the following error:
ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - Cannot delete or update a parent row: a foreign key constraint fails (
webappCRUD
.address
, CONSTRAINTFK6xl51eidwyq9xksr5b66bkq9p
FOREIGN KEY (addresses
) REFERENCESuser
(id
))
org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement