Hello!
I'm using Hibernate Annotation @Cascade(CascadeType.DELETE_ORPHAN) in addition to my JPA cascading annotations.
If I try to save a detached instance of the parent object whose children have been modified/deleted, update() only sets the foreign key of the children to 'null'.
Why are orphans only deleted when I use merge()??
Does this indicate that there might be a session that has already been opened? As far as I understood, update() should be used when a session is fresh.
I'm a little bit confused. Maybe there is someone who can give an explanation.
Hibernate Version: 3.2.6.ga
|