WARNING]
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException:
lgip
.tb_intention
, CONSTRAINT fk_intention_user
FOREIGN KEY (firm_id
) REFERENCES tb_user
(id
))lgip
.tb_intention
, CONSTRAINT fk_intention_user
FOREIGN KEY (firm_id
) REFERENCES tb_user
(id
)); SQL []; Cannot add or update a child row: a foreign key constraint fails (lgip
.tb_intention
, CONSTRAINT fk_intention_user
FOREIGN KEY (firm_id
) REFERENCES tb_user
(id
)); nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (lgip
.tb_intention
, CONSTRAINT fk_intention_user
FOREIGN KEY (firm_id
) REFERENCES tb_user
(id
))
大家讲道理2017-04-18 10:22:27
외래 키 테이블은 기본 키 테이블에 대해 왼쪽 링크 쿼리를 수행하고 일부 ID가 기본 키 테이블에 존재하지 않음을 확인한 후 해당 ID를 삭제할지 유지할지 결정할 수 있습니다.