异常 : identifier of an instance of com.mi.domain.Department was altered from 2 to 1

异常提示org.springframework.orm.hibernate4.HibernateSystemException: identifier of an instance of com.mi.domain.Department was altered from 2 to 1; nested exception is org.hibernate.HibernateException: identifier of an instance of com.mi.domain.Department was altered from 2 to 1

Workaround: Before saving operation is performed first to break the relationship (foreign key) between objects

Guess you like

Origin www.cnblogs.com/Sly-Mi/p/11184632.html