Fix some query caching issue related to pagination parameters and a small case sensitivity issue
This commit is contained in:
parent
59fbdb9039
commit
ea099e7e85
|
@ -78,7 +78,7 @@ public class OracleSqlAstTranslator<T extends JdbcOperation> extends AbstractSql
|
||||||
}
|
}
|
||||||
if ( strategy != LockStrategy.FOLLOW_ON ) {
|
if ( strategy != LockStrategy.FOLLOW_ON ) {
|
||||||
final boolean hasOffset;
|
final boolean hasOffset;
|
||||||
if ( querySpec.isRoot() && hasLimit() && getLimit().getFirstRowJpa() != 0 ) {
|
if ( querySpec.isRoot() && hasLimit() && getLimit().getFirstRow() != null ) {
|
||||||
hasOffset = true;
|
hasOffset = true;
|
||||||
// We must record that the generated SQL depends on the fact that there is an offset
|
// We must record that the generated SQL depends on the fact that there is an offset
|
||||||
addAppliedParameterBinding( getOffsetParameter(), null );
|
addAppliedParameterBinding( getOffsetParameter(), null );
|
||||||
|
|
|
@ -135,8 +135,8 @@ public class SQLServerSqlAstTranslator<T extends JdbcOperation> extends Abstract
|
||||||
final boolean hasLimit;
|
final boolean hasLimit;
|
||||||
final boolean hasOffset;
|
final boolean hasOffset;
|
||||||
if ( queryPart.isRoot() && hasLimit() ) {
|
if ( queryPart.isRoot() && hasLimit() ) {
|
||||||
hasLimit = getLimit().getMaxRowsJpa() != Integer.MAX_VALUE;
|
hasLimit = getLimit().getMaxRows() != null;
|
||||||
hasOffset = getLimit().getFirstRowJpa() != 0;
|
hasOffset = getLimit().getFirstRow() != null;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
hasLimit = queryPart.getFetchClauseExpression() != null;
|
hasLimit = queryPart.getFetchClauseExpression() != null;
|
||||||
|
|
|
@ -411,7 +411,7 @@ public abstract class AbstractSqlAstTranslator<T extends JdbcOperation> implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean hasOffset(QueryPart queryPart) {
|
protected boolean hasOffset(QueryPart queryPart) {
|
||||||
if ( queryPart.isRoot() && hasLimit() && limit.getFirstRowJpa() != 0 ) {
|
if ( queryPart.isRoot() && hasLimit() && limit.getFirstRow() != null ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -104,7 +104,7 @@ public class UnspecifiedEnumTypeTest extends BaseEnversFunctionalTestCase {
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<Object[]> values = session
|
List<Object[]> values = session
|
||||||
.createNativeQuery( "SELECT enum1 e1, enum2 e2 FROM ENUM_ENTITY_AUD ORDER BY rev ASC" )
|
.createNativeQuery( "SELECT enum1 e1, enum2 e2 FROM ENUM_ENTITY_AUD ORDER BY REV ASC" )
|
||||||
.addScalar( "e1", IntegerType.INSTANCE )
|
.addScalar( "e1", IntegerType.INSTANCE )
|
||||||
.addScalar( "e2", IntegerType.INSTANCE )
|
.addScalar( "e2", IntegerType.INSTANCE )
|
||||||
.list();
|
.list();
|
||||||
|
|
Loading…
Reference in New Issue