HHH-14027 Allow the creation of a different QueryLoader

This commit is contained in:
Davide D'Alto 2020-05-14 10:32:07 +01:00 committed by Steve Ebersole
parent 5968044118
commit d914c8aabc
1 changed files with 5 additions and 1 deletions

View File

@ -210,7 +210,7 @@ public class QueryTranslatorImpl implements FilterTranslator {
else {
// PHASE 3 : Generate the SQL.
generate( (QueryNode) sqlAst );
queryLoader = new QueryLoader( this, factory, w.getSelectClause() );
queryLoader = createQueryLoader( w, factory );
}
compiled = true;
@ -245,6 +245,10 @@ public class QueryTranslatorImpl implements FilterTranslator {
this.enabledFilters = null;
}
protected QueryLoader createQueryLoader(HqlSqlWalker w, SessionFactoryImplementor factory) {
return new QueryLoader( this, factory, w.getSelectClause() );
}
private void generate(AST sqlAst) throws QueryException, RecognitionException {
if ( sql == null ) {
final SqlGenerator gen = new SqlGenerator( factory );