sb.append(' ').append(mainAlias);
}
}
else
{
FetchStatement subQuery = mainTable.getStoreManager().getFetchStatement(mainTable);
Iterator i = columns.iterator();
while (i.hasNext())
{
subQuery.select((DatastoreField)i.next());
}
// Assumed to not want any locking in this statement
sb.append('(').append(subQuery.toString(false)).append(") ").append(mainAlias);
}
sqlText = sb.toString();
}