java往数据库添加信息的时候报了这个错误
[com.j256.ormlite.stmt.mapped.BaseMappedStatement]-<insertdatawithstatement'INSERTINT...
[com.j256.ormlite.stmt.mapped.BaseMappedStatement] - <insert data with statement 'INSERT INTO `zqbp_custom` (`CUSTOM_ID` ,`CUSTOM_NAME` ,`CUSTOM_ADDRESS` ,`CUSTOM_TEL` ,`CUSTOM_TRADE` ,`CREATE_TIME` ,`CREATE_USER` ,`status` ) VALUES (?,?,?,?,?,?,?,?)' and 8 args, threw exception: java.sql.SQLException: Cannot add or update a child row: a foreign key constraint fails (`zqbp`.`zqbp_custom`, CONSTRAINT `zqbp_custom_ibfk_1` FOREIGN KEY (`custom_trade`) REFERENCES `zqbp_industry` (`industry_id`))>
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询