List keys = (List) values.get(fieldName);
ModelClassBase middleModelClass = getMiddleClass();
Field middleModelField = getMiddleField();
Field middleModelReferenceField = getReverseField().getMiddleField();
for (Object key : keys) {
Model middleObj = middleModelClass.newInstance();
middleObj.setValue(middleModelField, values.get(getKeyFieldName()));
middleObj.setValue(middleModelReferenceField, key);
middleObj.save();
}
}