Ali Hopyar (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMWRlNTZhMTFk...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-14079?atlOrigin=eyJpIjoiMWRlNT...
) HHH-14079 (
https://hibernate.atlassian.net/browse/HHH-14079?atlOrigin=eyJpIjoiMWRlNT...
) Orphan removal does not work on session.update function (
https://hibernate.atlassian.net/browse/HHH-14079?atlOrigin=eyJpIjoiMWRlNT...
)
Change By: Ali Hopyar (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
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
(
https://hibernate.atlassian.net/browse/HHH-14079#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-14079#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100130- sha1:5f5b10c )