HHH-12569 - Fix ordered inserts constraint violation when using a OneToOne with a JoinColumn.
This commit is contained in:
parent
3c3dc88283
commit
de44e4180d
|
@ -1272,7 +1272,9 @@ public class ActionQueue {
|
|||
final String rootEntityName = action.getSession().getFactory().getMetamodel().entityPersister( entityName ).getRootEntityName();
|
||||
|
||||
if ( entityType.isOneToOne() && OneToOneType.class.cast( entityType ).getForeignKeyDirection() == ForeignKeyDirection.TO_PARENT ) {
|
||||
if ( !entityType.isReferenceToPrimaryKey() ) {
|
||||
batchIdentifier.getChildEntityNames().add( entityName );
|
||||
}
|
||||
if ( !rootEntityName.equals( entityName ) ) {
|
||||
batchIdentifier.getChildEntityNames().add( rootEntityName );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue