mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 00:24:57 +00:00
HHH-17769 Ignore query options limit when rendering cte definitions
This commit is contained in:
parent
e80329f962
commit
841e4bedc7
@ -2445,8 +2445,11 @@ private boolean isInSubquery() {
|
|||||||
protected void visitCteDefinition(CteStatement cte) {
|
protected void visitCteDefinition(CteStatement cte) {
|
||||||
final CteStatement oldCteStatement = currentCteStatement;
|
final CteStatement oldCteStatement = currentCteStatement;
|
||||||
currentCteStatement = cte;
|
currentCteStatement = cte;
|
||||||
|
final Limit oldLimit = limit;
|
||||||
|
limit = null;
|
||||||
cte.getCteDefinition().accept( this );
|
cte.getCteDefinition().accept( this );
|
||||||
currentCteStatement = oldCteStatement;
|
currentCteStatement = oldCteStatement;
|
||||||
|
limit = oldLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -6211,11 +6214,14 @@ protected void inlineCteTableGroup(TableGroup tableGroup, LockMode lockMode) {
|
|||||||
true,
|
true,
|
||||||
null
|
null
|
||||||
);
|
);
|
||||||
|
final Limit oldLimit = limit;
|
||||||
|
limit = null;
|
||||||
statementStack.push( cteDefinition );
|
statementStack.push( cteDefinition );
|
||||||
renderPrimaryTableReference( queryPartTableGroup, lockMode );
|
renderPrimaryTableReference( queryPartTableGroup, lockMode );
|
||||||
if ( queryPartTableGroup.isLateral() && !dialect.supportsLateral() ) {
|
if ( queryPartTableGroup.isLateral() && !dialect.supportsLateral() ) {
|
||||||
addAdditionalWherePredicate( determineLateralEmulationPredicate( queryPartTableGroup ) );
|
addAdditionalWherePredicate( determineLateralEmulationPredicate( queryPartTableGroup ) );
|
||||||
}
|
}
|
||||||
|
limit = oldLimit;
|
||||||
statementStack.pop();
|
statementStack.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user