Let's say I have two entites like
{code:java} @Entity(name = "Parent") @Table(name = "parent") public class Parent {
@Transient private SomePOJO transient;
@OneToMany(mappedBy = "parent", cascade = CascadeType.All, orphanRemoval = true) private List<Child> children;
//getters, setters and other fields }
@Entity(name = "Child") @Table(name = "child") public class Child {
@ManyToOne private Parent parent;
//getters, setters and other fields } {code}
When I call session.update with parent entity, orphanRemoval does not have any affect. I It does not delete child entity and relationship between parent and child |
|