DatastoreElementContainer collTable = (DatastoreElementContainer)joinTable;
referenceMapping = collTable.getElementMapping();
selectMapping = collTable.getOwnerMapping();
DatastoreObject mainTable = qs.getMainTableExpression().getMainTable();
if (!mainTable.equals(joinTable))
{
// Statement selects the element table and the owner column should be selected
// Join across to the join table, and select the owner mapping of the join table
// TODO Move this hardcoded table name out into the calling class so it controls the names of all table aliases