具体报错:
identifier of an instance of zz.ibs.domain.Permission was altered from 3 to 4; nested exception is org.hibernate.HibernateException: identifier of an instance of zz.ibs.domain.Permission was altered from 3 to 4
解决办法:
找到该报错信息对应的controller层java代码,再找到执行该操作的java方法,因为我写的表结构是部门和员工,是单向多对一的联系,所以需要断开联系,添加一句代码,emp.setDepartment(null);才能正常执行功能,不会报错HibernateException。
报错HibernateException: from n to n
最新推荐文章于 2022-09-13 16:50:31 发布