HHH-16576 Fix column aliases when rendering query part with table reference aliasing emulation
This commit is contained in:
parent
5f99dd3862
commit
ac8b2a02b1
|
@ -2865,7 +2865,8 @@ public abstract class AbstractSqlAstTranslator<T extends JdbcOperation> implemen
|
||||||
if ( currentQueryPart != null && queryPartForRowNumberingClauseDepth != clauseStack.depth() ) {
|
if ( currentQueryPart != null && queryPartForRowNumberingClauseDepth != clauseStack.depth() ) {
|
||||||
this.queryPartForRowNumbering = null;
|
this.queryPartForRowNumbering = null;
|
||||||
this.queryPartForRowNumberingClauseDepth = -1;
|
this.queryPartForRowNumberingClauseDepth = -1;
|
||||||
this.needsSelectAliases = false;
|
// If explicit column aliases were defined we should still use them when rendering the select clause
|
||||||
|
this.needsSelectAliases = columnAliases != null;
|
||||||
}
|
}
|
||||||
// If we are row numbering the current query group, this means that we can't render the
|
// If we are row numbering the current query group, this means that we can't render the
|
||||||
// order by and offset fetch clause, so we must do row counting on the query group level
|
// order by and offset fetch clause, so we must do row counting on the query group level
|
||||||
|
|
Loading…
Reference in New Issue