java - Hibernate: Updating OneToMany relationship -
i have parent list of child mapped. may know how update list of child when update parent example: a parent p1 have child b c. i decided delete b , add d so parent p1 have child c d in database. currently merely delete child belongs parent p1 , repopulate chid(a c d) again... believe there more simple way of doing so. i know task quite sensitive, please kind enough let me know need set ensure child inserted , deleted properly. new question: 1) there way lazy update/delete relationship? have list fetchtype.lazy, when updating data, might not wish load relationship or update it. 2) if list have item b c, removed item c , dto.save(). item c deleted? here mapping update child using parent - @entity @table(name = "company") @sequencegenerator(name="companyseq", sequencename="companyseq", allocationsize=1) public class company implements serializable { private static final long serialversionuid = 1l; /* * custome...