stmt.getTableExpression(collectionTableAlias));
stmt.andCondition(ownerExpr.eq(ownerInCollectionExpr));
// Select COUNT(*)
JavaTypeMapping m = storeMgr.getMappingManager().getMapping(String.class);
StringLiteral lit = (StringLiteral)m.newLiteral(stmt, "COUNT(*)");
lit.generateStatementWithoutQuotes();
stmt.selectScalarExpression(lit);
// TODO This needs to restrict the discriminator also where it is present (see sizeStmt)
return stmt;