I have very complex structure with multiple tables to simplify I will post small example
I have 4 entities
A -> entityId
B -> entityId (A- -Onetoone B)
C -> entityId (A- -Onetoone C)
D -> entityId (A- -Onetoone D)
In DB I have constraint of FK for entity D onto entity C (ideally incorrect but changing structure is not possible due to high impact)
After moving to hibernate5 insertion order is affected and it raises ConstraintViolationException for table D as it tries to insert D before C
Is there any way I can manually reorder table inserts such as C should be executed before D ?