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
))
你插入的 firm_id在tb_user表中沒有對應的id。 。 。 。 。 。 。
外鍵表對主鍵表做左連結查詢到有部分id沒有在主鍵表中存在 之後是刪是留改自己決定咯