Orphan removal does not work for OneToOne relations in one transaction

Description

The case is already described in https://hibernate.atlassian.net/browse/HHH-9663 and I throught it's solved with version 5.2.10.
But the problem still available - see project in attachment.

The clue: the setting of dependent-entity on root-entity ant then setting it to null on root-entity happens in the same transaction!

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

Environment

Tested with H2

Activity

Show:
Christopher Smith
September 12, 2018, 5:04 PM

I confirm that the problem is present in 5.3.6 and is triggered with both H2 and Postgres 9.

Deepak Bapat
July 29, 2019, 1:49 PM

I confirm that the problem is present in 5.4.3, triggered with H2. I used Hibernate’s native session management to trigger this issue rather than the JPA EntityManager.

Is this issue currently in queue to be fixed or should I use workarounds for the foreseeable future? Either way I’m fine, but I’m starting a new project with Hibernate and wondering if there is a timetable for a fix here.

Assignee

Unassigned

Reporter

Robert Gevorkov

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Major
Configure