HHH-14027 Allow the creation of a different QueryLoader
This commit is contained in:
parent
5968044118
commit
d914c8aabc
|
@ -210,7 +210,7 @@ public class QueryTranslatorImpl implements FilterTranslator {
|
||||||
else {
|
else {
|
||||||
// PHASE 3 : Generate the SQL.
|
// PHASE 3 : Generate the SQL.
|
||||||
generate( (QueryNode) sqlAst );
|
generate( (QueryNode) sqlAst );
|
||||||
queryLoader = new QueryLoader( this, factory, w.getSelectClause() );
|
queryLoader = createQueryLoader( w, factory );
|
||||||
}
|
}
|
||||||
|
|
||||||
compiled = true;
|
compiled = true;
|
||||||
|
@ -245,6 +245,10 @@ public class QueryTranslatorImpl implements FilterTranslator {
|
||||||
this.enabledFilters = null;
|
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 {
|
private void generate(AST sqlAst) throws QueryException, RecognitionException {
|
||||||
if ( sql == null ) {
|
if ( sql == null ) {
|
||||||
final SqlGenerator gen = new SqlGenerator( factory );
|
final SqlGenerator gen = new SqlGenerator( factory );
|
||||||
|
|
Loading…
Reference in New Issue