Figure out why the order of the operations matters

Description

While working on the hibernate-demos project we had to apply the following change:
from

to

Emmanuel possible explanation:

here is my pseudo scientific proposal.
In the code, we do a persist which triggers an insert request, then we add a link to the object which triggers an update request. Could it be that somehow, when the batch operation is happening, the two operations are 1. not collapsed 2. the second update is transformed into an insert. That would explain the behavior.
Maybe that can lead you to an explanation of the bug.

Environment

None

Assignee

Unassigned

Reporter

Davide D'Alto

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

Pull Request

None

backportDecision

None

backportReEvaluate

None

Fix versions

Priority

Major
Configure