Embedded classes not taken into account when order_inserts is enabled

Description

It seems that Embedded classes are not being taken into account when batch insert statements are ordered.

In the test case for example, when the insert statements are ordered (org.hibernate.engine.ActionQueue.sortInsertActions), the "state" of the Car EntityInsertAction is the (Embedded)Registration object, but the checkAction instance ,that should be indicating that there is a FK dependency, is of course, Driver. So the Car insert, which has a FK to the Driver insert, is ordered to execute before the Driver insert.

Environment

None

Activity

Show:
Brett Meyer
July 10, 2013, 3:56 PM

, I'm still willing to work with your pull request, but can you please give us the test case that you were using to reproduce?

Brett Meyer
August 6, 2013, 3:27 AM

Closing this, for now. On master (4.3.0-SNAPSHOT), I'm not able to reproduce. (or anyone), if there's a newer test case that proves otherwise, please attach and mention it.

hezh
September 19, 2013, 2:31 PM

Hi,
i found this problem too, but it only happens when:
-IDENTITY is the generation strategy.
-order_inserts is set to true.
Whenever order_inserts is set to false, or the strategy is for example SEQUENCE, it shall not be reproduceable (in my case, when we changed from a PostgreSQL DB to a MS SQLServer with GenerationType.AUTO)
I hope it helps to solve the issue.
Thx!

Brett Meyer
September 20, 2013, 1:31 PM

, have a test case we could use to reproduce?

Brett Meyer
October 9, 2013, 3:25 PM

Closing this, for now. The ActionQueue was recently revamped (4.3.0) and included fixes similar to 's original pull request. Judging by the stacktraces, this should no longer be an issue.

I verified that the original test case works w/ hibernate.order_inserts=true and IDENTITY id generation. Please try this again on 4.3.0.Beta5 when it's out later today.

Assignee

Brett Meyer

Reporter

Dave Stephan

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

Affirmative

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure