异常描述
本人在编写一对多实体的级联操作时需要进行新实体的添加和老实体的删除,所以当下的思路是将整个Set对象置空然后重新添加。但是由于置空的方法对于JPA底层的Hibernate来说非法所以报了如下的异常。
org.springframework.orm.jpa.JpaSystemException:
A collection with cascade="all-delete-orphan" was no longer referenced by the owning entity instance: com.intelligent.smartpark.rent.jpa.repository.model.EstatePotentialClient.shopList; nested exception is org.hibernate.HibernateException: A collection with cascade="all-delete-orphan" was n