摘要:
提问:我刚学hibernate里面讲了双向关联,我设计了表student 字段id,name,teacherid,teacher表字段id,name,studentid teacherid关联teacher的id,studentid关联student表的id,然后我想插入其中一张表的时候,无法插入数据 报错信息:Cannot add or update a child row: a foreign key constraint fails (`upload/student`, CONSTRAINT `FK_Reference_2` FOREIGN KEY (`teacherid`) REFER 阅读全文