((newValue == null) && (originalValue == null)) // Don't update if both are null
|| (isDeleteMarker(newValue) && fieldIsNewOrDeleted) // Don't delete if it doesn't exist
|| (newValue.equals(originalValue))) // Don't update if they didn't change
|| newMetadata.containsKey(field.getKey())) { // But do update if the metadata changed
FieldTypeImpl fieldType = (FieldTypeImpl) fieldTypes.getFieldType(fieldName);
Scope scope = fieldType.getScope();
boolean metadataOnlyUpdate = false;
if (newValue == METADATA_ONLY_UPDATE) {
// The metadata was updated, but the field itself not
metadataOnlyUpdate = true;