doesn't remove the orphan entry
-------------------------------
Key: HHH-6037
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6037
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.5.3
Environment: Hibernate 3.5.3, JPA 2, ORACLE 11g
Reporter: Premraj Motling
Hibernate don't delete the orphan entries with OneToOne even after set to null
@Entity
public class Foo{
@Id
private long foo_id;
private String name;
@OneToOne(mappedBy = "foo", orphanRemoval = true)
private FooProperties fooProperties;
}
@Entity
public class FooProperties{
@Id
private long fp_id;
private String phoneNumber;
@OneToOne
@JoinColumn(name = "foo_id", nullable = false)
private Foo foo;
}
and if I do -
Foo foo = entityManager.find(Foo.class, fooId);
foo.getFooProperties.setFoo(null);
foo.setFooProperties(new FooProperties("xxx-xxx-xxx"));
entityManager.merge(foo);
its not deleting the FooProperties
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira