// add in the joins
ContainerFieldStrategy.appendUnaliasedJoin(sql, sel, null,
ctx.store.getDBDictionary(), field, fk);
sql.append(" AND ");
key = strat.toKeyDataStoreValue(key, ctx.store);
Column[] cols = strat.getKeyColumns(cls);
Object[] vals = (cols.length == 1) ? null : (Object[]) key;
for (int i = 0; i < cols.length; i++) {
sql.append(cols[i].getTable()).append(".").append(cols[i]);