상황 Caused by: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails(`DB`.`테이블명`, CONSTRAINT `fk_테이블명_외래키` FOREIGN KEY (`외래키`) REFERENCES `참조하는 테이블` (`참조하는 테이블의 키`) ON DELETE NO ACTION ON UPDATE NO ACTION) 해결방법 (`DB`.
`테이블명`, CONSTRAINT `fk_테이블명_외래키` FOREIGN KEY (`외래키`) REFERENCES `참조하는 테이블` (`참조하는 테이블의 키`) ON DELETE NO ACTION ON UPDATE NO ACTION) 를 자세히 보고 해결했다 테이블명에 있는 외래키 가 참조하는 테이블의 키가 존재하지 도 않는데 update해서 생긴 문제였다. 참고로 controller에서 ex...
#
a
#
SQLIntegrityConstraintViolationException
#
row
#
or
#
key
#
foreign_key
#
foreign
#
DataIntegrityViolationException
#
childrow
#
child
#
cannot
#
add
#
update
원문 링크 : Caused by: java.sql.SQLIntegrityConstraintViolationException: Cannot add or update a child row