import org.xorm.tests.model.*;
public class TestFetchGroupManager extends FetchGroupManager {
public DataFetchGroup getDataFetchGroup(ClassMapping mapping) {
Table table = mapping.getTable();
if ("employee".equals(table.getName())) {
DataFetchGroup dfg = new DataFetchGroup(table.getColumns());
mapping = XORM.getModelMapping(factory).getClassMapping(Address.class);
DataFetchGroup dfg2 = new DataFetchGroup(mapping.getTable().getColumns());
dfg.addSubgroup(table.getColumnByName("address_id"), dfg2);
return dfg;
} else {
return super.getDataFetchGroup(mapping);
}
}