save-update with Cascade

Let’s perform Save-Update operations with and without cascade to understand it better save-update with Cascade Annotation configuration Applicant.java @OneToMany(mappedBy="applicant")   @Cascade(CascadeType.SAVE_UPDATE)       private Set<Address> addresses; @OneToMany(mappedBy=”applicant”) @Cascade(CascadeType.SAVE_UPDATE) private Set<Address> addresses; XML configuration applicant.hbm.xml <set name="addresses" table="Address"                 inverse="true" lazy="true" fetch="select" cascade="save-update">           […]

Share this article on