Expression joinExpression = parentDescriptor.getInheritancePolicy().getChildrenTablesJoinExpressions().get(table);
//Some of our tables might be the in our parent as well, so ignore the lack of a joinExpression
if (joinExpression != null) {
joinExpression = this.baseExpression.twist(joinExpression, this);
if (shouldUseOuterJoin()) {
joinExpression = joinExpression.convertToUseOuterJoin();
}
criteria = joinExpression.and(criteria);
}
}
}