final SessionFactoryImplementor factory = criteriaQuery.getFactory();
final OuterJoinLoadable persister = (OuterJoinLoadable) factory.getEntityPersister( criteriaImpl.getEntityOrClassName() );
createAndSetInnerQuery( criteriaQuery, factory );
CriteriaJoinWalker walker = new CriteriaJoinWalker(
persister,
innerQuery,
factory,
criteriaImpl,
criteriaImpl.getEntityOrClassName(),
new HashMap(),
innerQuery.getRootSQLALias());
String sql = walker.getSQLString();
final StringBuffer buf = new StringBuffer()
.append( toLeftSqlString(criteria, criteriaQuery) );
if (op!=null) buf.append(' ').append(op).append(' ');
if (quantifier!=null) buf.append(quantifier).append(' ');