Replacing an entity on a one-to-one delete-orphan association with a new instance does not delete the previous one

Description

On DeleteOneToOneOrphansTest, setting Employee.employeeInfo to a new EmployeeInfo instance (instead of setting it to null) doesn't trigger the deletion of the old employeeInfo raising a ConstraintViolationException.

Please refer to the attached test suite patch.

This is somewhat related to HHH-4726.

Environment

None

Status

Assignee

Brett Meyer

Reporter

Mauricio Hiroshi Nagaoka

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure