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
The firm_id you inserted does not have a corresponding id in the tb_user table. . . . . . .
大家讲道理2017-04-18 10:22:27
The foreign key table performs a left link query on the primary key table and finds that some IDs do not exist in the primary key table. You can then decide whether to delete or retain them