public Object getValue(Model obj) throws DBException {
ModelClassBase middleCls = getMiddleClass();
Field middleField = getMiddleField();
Object keyValue = obj.getData().get(getKeyFieldName());
return middleCls.filter(middleField.eq(keyValue)).target(middleField);
}
public void createMiddleClass() throws DBException {
ModelClassBase referenceModelClass = getReferenceClass();
ModelClassBase middleModelClass = getMiddleClass();