删除孤儿数据
//获得set,清空
umpActivity.getUmpActivityTypeSet().clear();
//设置新值,会将新的数据加进去,原来的全部会被删掉,因为?@Cascade(org.hibernate.annotations.CascadeType.ALL)
umpActivity.getUmpActivityTypeSet().addAll(newUmpActivityTypeSet);
?
?
@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "umpActivity", fetch = FetchType.EAGER)
?@Cascade(org.hibernate.annotations.CascadeType.ALL)
?@JoinColumn(name = "activity_id")
?@OrderBy("umpType")
?public Set<UmpActivityType> getUmpActivityTypeSet() {
??return umpActivityTypeSet;
?}