且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

休眠JPA值删除OneToMany关系

更新时间:2022-10-23 22:03:20

I have found out the answer in jpa removing child from collection. as a result adding orphanRemoval=true solved the problem.

@Entity(name ="alarmnotify_email_conf") @Table(name = "alarmnotify_email_conf") public class AlarmnotifyEmailConfEntity implements Serializable {

@OneToMany(mappedBy = "alarmnotifyEmailConfRef",cascade=CascadeType.ALL ,orphanRemoval=true) private List alarmnotifyEmailEntityList;

}//end of Class

相关阅读

技术问答最新文章