We're updating the issue view to help you get more done. 

Orphan removal does not work for OneToOne relations

Description

According to JPA 2.1 specification (page 476) if an entity is removed from the one to one relation (by setting the reference to null) and the relation is marked with orphan removal, the referenced entity should be deleted from the database.

When I created one sided (no reverse reference) one to one relationship between two entities and set the orphan removal attribute to true, the referenced object is still in database after setting reference to null.

If you have any questions/suggestions feel free to ask.

Environment

Tested with PostgreSQL 9.3

Status

Assignee

Chris Cranford

Reporter

Arkadiusz Firus

Fix versions

backPortable

Backport?

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

5.1.5
5.0.12
4.3.7
4.3.8
5.2.9

Priority

Major