Union union = _store.getSQLFactory().newUnion(
(Select[]) sels.toArray(new Select[sels.size()]));
populateUnion(union, mappings, subclasses, facts, exps, states, ctx,
false, eager, start, end);
if (union.isUnion())
return new String[] {union.toSelect(false, fetch).getSQL(true)};
sels = Arrays.asList(union.getSelects());
} else {
Select sel;
for (int i = 0, idx = 0; i < sels.size(); i++) {
sel = (Select) sels.get(i);