在java怎么更改sql外键 |
您所在的位置:网站首页 › 外键约束失败怎么解决 › 在java怎么更改sql外键 |
外键约束失败 该怎么解决 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)) 相关阅读: CodeIgniter调用第三方类库TCPDF? django queryset 条件怎么从表单里面获取 移动端商品加载页商品div高度不一致导致错位求解决方案 图片加载完毕的问题 微信浏览器内使用a标签直接跳转页面无反应 avalon2 单页面时候切换页面问题 webpack-dev-server 能不能同时输出内容到文件啊? MUI在第二次打开预加载的webview时,怎么让其重新回到顶部? VS使用Oracle.DataAccess.Client连接Oracle数据库失败? js怎样获取当前鼠标位置【所有】dom? 用collectionview做个了日历 宽度均分 但中间总有缝隙 MyBatis动态SQL实现ORDER BY和LIMIT的控制? 关于一段数据库备份的脚本的疑问 vuejs如何把在集合中过滤的结果放在一个数组中 Electron如何做到点击桌面图标只打开一个应用? var m = angular.module('hd',[])中[]是什么意思。 怎样权衡多态和判断? 用Egret写的小游戏,怎么分享到微信呢? Uncaught ReferenceError: React is not defined出错? Spark shuffle reducer 个数是怎么确定的? |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |