);
}
// NOTE EARLY EXIT!
return Collections.emptySet();
}
final Set<AbstractEntityInsertAction> resolvedActions = new IdentitySet( );
if ( traceEnabled ) {
LOG.tracev(
"Unresolved inserts before resolving [{0}]: [{1}]",
MessageHelper.infoString( entityEntry.getEntityName(), entityEntry.getId() ),
toString()
);
}
for ( AbstractEntityInsertAction dependentAction : dependentActions ) {
if ( traceEnabled ) {
LOG.tracev(
"Resolving insert [{0}] dependency on [{1}]",
MessageHelper.infoString( dependentAction.getEntityName(), dependentAction.getId() ),
MessageHelper.infoString( entityEntry.getEntityName(), entityEntry.getId() )
);
}
final NonNullableTransientDependencies dependencies = dependenciesByAction.get( dependentAction );
dependencies.resolveNonNullableTransientEntity( managedEntity );
if ( dependencies.isEmpty() ) {
if ( traceEnabled ) {
LOG.tracev(
"Resolving insert [{0}] (only depended on [{1}])",
dependentAction,
MessageHelper.infoString( entityEntry.getEntityName(), entityEntry.getId() )
);
}
// dependentAction only depended on managedEntity..
dependenciesByAction.remove( dependentAction );
resolvedActions.add( dependentAction );
}
}
if ( traceEnabled ) {
LOG.tracev(
"Unresolved inserts after resolving [{0}]: [{1}]",