Insert fails on one-to-one mapping when an intermediate embeddable type is between mappings when using ordered inserts.

Description

Having an ORM with a one-to-one mapping looking like: Booking (Entity) -> IntermediateObject (Embeddable) -> Comment (Entity)
And the resulting book table has a foreign key to the comment table.

When trying to insert one book with no comment and another book with a comment in the same transaction a foreign key constraint violation is thrown.

Environment

None

Status

Assignee

Chris Cranford

Reporter

Lars Storm

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.2.13

Priority

Major
Configure