// It is important to add the join table here so that this table does not
// get lost behind the same join table in parentPlan's table list
// See collection38
//
for (int i = 0; i < parentField.assocLocalColumns.size(); i++) {
ColumnElement col = (ColumnElement) parentField.assocLocalColumns.get(i);
addQueryTable(col.getDeclaringTable(), config);
}
}
// Add the joined tables.
// This is required for cases where no fields from this plan are selected
// The side-effect for this is to create statements with no columns.
for (int i = 0; i < parentField.foreignColumns.size(); i++) {
ColumnElement col = (ColumnElement) parentField.foreignColumns.get(i);
addQueryTable(col.getDeclaringTable(), config);
}
}
}