if (joinCriteria == null) {
joinCriteria = QueryRewriter.TRUE_CRITERIA;
}
joinCriteria = (Criteria)joinCriteria.clone();
//update the from clause
FromClause clause = (FromClause)currentQuery.getFrom().getClauses().remove(0);
JoinPredicate join = null;