Hello,
I am having a bidirectional relationship between objects and have cascade remove defined on the opposite side e.g.
Code:
@Entity
@Table(name = "p")
public final class PImpl implements P
{
...
@OneToMany(targetEntity = EImpl.class, mappedBy = "_p", cascade={CascadeType.REMOVE)
private final List<E> _eList;
...
}
@Entity
@Table(name = "e)
public final class EImpl implements E
{
...
@ManyToOne(targetEntity = PImpl.class)
@JoinColumn(name = "p_uuid")
private P_p;
...
}
But when I request the deletion of an object of type "P", Hibernate tries to remove it without removing before the objects of type "E", why?