ivanlp10n2 / webservice-app

crud to refactor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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, CONSTRAINT FK6xl51eidwyq9xksr5b66bkq9p FOREIGN KEY (addresses) REFERENCES user (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