1、@OneToMany(mappedBy = "userModel", cascade = CascadeType.ALL, fetch = FetchType.EAGER,orphanRemoval=true)
private Set<UserVessel> vessels;
把orphanRemoval=true加上
2、userModel.getVessels().clear 清空set 集合
3、userModelDao.saveOrUpdate(userModel);
private Set<UserVessel> vessels;
把orphanRemoval=true加上
2、userModel.getVessels().clear 清空set 集合
3、userModelDao.saveOrUpdate(userModel);