for (int i=0;i<relationFieldNumbers.length;i++)
{
Object value = sm.provideField(relationFieldNumbers[i]);
if (value != null && om.getApiAdapter().isDetached(value))
{
Object valueAttached = om.persistObjectInternal(value, null, null, -1, StateManager.PC);
sm.replaceField(relationFieldNumbers[i], valueAttached, false);
}
}
// Perform reachability on all fields that have no datastore column (1-1 bi non-owner, N-1 bi join)