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没有在主键表中存在 之后是删是留改自己决定咯