Field middleModelReferenceField = getReverseField().getMiddleField();
for (Object key : keys) {
Model middleObj = middleModelClass.newInstance();
middleObj.setValue(middleModelField, values.get(getKeyFieldName()));
middleObj.setValue(middleModelReferenceField, key);
middleObj.save();
}
}
public void remove(Model obj) throws DBException {
ModelClassBase middleModelClass = getMiddleClass();