DatastoreClass candidateTable = storeMgr.getDatastoreClass(candidateClass, clr);
// Add the element table to the query, called "SET_ELEMENTS"
DatastoreIdentifier elementTblAlias = storeMgr.getIdentifierFactory().newIdentifier(
IdentifierFactory.TABLE, "SET_ELEMENTS");
LogicSetExpression elementTblExpr = stmt.newTableExpression(candidateTable, elementTblAlias);
// Inner Join from the ID of the element to the element mapping of the join table
JavaTypeMapping elementTableID = candidateTable.getIDMapping();
ScalarExpression elmSetExpr = elementMapping.newScalarExpression(stmt,
stmt.getTableExpression(setTableAlias));