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

order_inserts: StackOverflowError when flushing a session

Description

The fix for "HHH-12074 - order_inserts: flush during transaction causes incorrect insert ordering and subsequent constraint violation" added a "parent" field to BatchIdentifier, to sort entries.
However, the current code does not account for scenarios with cross-linked entities.

I've attached a ORMUnitTestCase sample.
It works with 5.2.12.Final.
It fails with 5.2.13.Final and later versions.

Environment

None

Status

Assignee

Davide Massarenti

Reporter

Davide Massarenti

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.2.12

Components

Affects versions

5.2.15
5.2.13
5.3.0.CR1
5.2.14

Priority

Major