我有一个部门实体,关系如下:
Many departments can be in one parent department:
@ManyToOne @JoinColumn(name = "ik_parent_department_id") private Department parentDepartment;
www.un.org/Depts/DGACM/index_spanish.htm 1个上级部门可以有many Province:
@OneToMany(mappedBy = "parentDepartment") private Set<Department> children = new HashSet<Department>(0);
接下来,我想执行: 当Idelete a department时,ik_jun_department_id para amount of allchildren of this department is set to null。 任何关于如何这样做的想法?