if (sm.isFieldLoaded(relatedMmd.getAbsoluteFieldNumber()))
{
Object currentVal = sm.provideField(relatedMmd.getAbsoluteFieldNumber());
if (currentVal != ownerSM.getObject())
{
sm.replaceFieldValue(relatedMmd.getAbsoluteFieldNumber(), ownerSM.getObject());
}
}
}
}
else if (change.type == ChangeType.REMOVE_OBJECT)