java - 外键约束失败 该怎么解决
PHP中文网
PHP中文网 2017-04-18 10:20:27
0
2
510

WARNING]
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException:

Error updating database. Cause: 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))

The error may involve com.nstc.lgip.idao.TbIntentionMapper.insert-Inline

The error occurred while setting parameters

SQL: insert into tb_intention (id, firm_id, industry_type ) values (?, ?, ? )

Cause: 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))

; 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))

PHP中文网
PHP中文网

认证高级PHP讲师

최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!