EOFetchSpecification fetchSpec = new EOFetchSpecification(_entity.name(), tagNameQualifier, null);
EOSQLExpression sqlExpression = sqlHelper.sqlExpressionForFetchSpecification(editingContext, fetchSpec, 0, -1, fetchAttributes);
NSMutableArray<EOAttribute> groupByAttributes = new NSMutableArray<EOAttribute>();
groupByAttributes.addObjectsFromArray(pkAttrs);
sqlHelper.addGroupByClauseToExpression(groupByAttributes, sqlExpression);
sqlHelper.addHavingCountClauseToExpression(EOQualifier.QualifierOperatorEqual, tagNames.count(), sqlExpression);
// MS: Sketchy, I know, but I don't know how to make it do the
// join for me without also having the tag name field selected. I'm sure it's
// possible if I drop down and use lower level API's than
// sqlExpr.selectStatementForAttributes.