Error flushing with a many-to-many Map defined with unique="true" and cascading orphan delete

Description

Starting in 4.2.7, the following association mapping results in an error on flushing (regardless of whether there was a change to the collection).

Stacktrace:

I've attached a test case (org.hibernate.test.manytomany.mapunique.ManyToManyUniqueDelOrphanTest). The test case succeeds under 4.2.6, but fails under 4.2.7 (and master).

I believe this regression was caused by the fix for HHH-6484.

Environment

None

Status

Assignee

Brett Meyer

Reporter

Darren Alec

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