Won't Fix
Details
Assignee
Emmanuel BernardEmmanuel BernardReporter
Loïc DLoïc DPriority
Major
Details
Details
Assignee
Emmanuel Bernard
Emmanuel BernardReporter
Loïc D
Loïc DPriority
Created September 13, 2010 at 11:55 AM
Updated March 7, 2014 at 5:31 PM
Resolved September 27, 2010 at 5:25 PM
I have an class A with a oneToRelation with a classe B :
@Entity
public class A{
@OneToOne(cascade = {CascadeType.ALL}, orphanRemoval=true)
B b;
...
}
If i do this :
A a = new A();
B b1 = new B();
a.setB(b1);
em.persist(a);
B b2 = new B();
a.setB(b2);
em.update(a);
As b1 become an orphan, Hibernate should remove it from the database. But it still remains in the DB.