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 ) {
|
||||
final boolean hasOffset;
|
||||
if ( querySpec.isRoot() && hasLimit() && getLimit().getFirstRowJpa() != 0 ) {
|
||||
if ( querySpec.isRoot() && hasLimit() && getLimit().getFirstRow() != null ) {
|
||||
hasOffset = true;
|
||||
// We must record that the generated SQL depends on the fact that there is an offset
|
||||
addAppliedParameterBinding( getOffsetParameter(), null );
|
||||
|
|
|
@ -135,8 +135,8 @@ public class SQLServerSqlAstTranslator<T extends JdbcOperation> extends Abstract
|
|||
final boolean hasLimit;
|
||||
final boolean hasOffset;
|
||||
if ( queryPart.isRoot() && hasLimit() ) {
|
||||
hasLimit = getLimit().getMaxRowsJpa() != Integer.MAX_VALUE;
|
||||
hasOffset = getLimit().getFirstRowJpa() != 0;
|
||||
hasLimit = getLimit().getMaxRows() != null;
|
||||
hasOffset = getLimit().getFirstRow() != null;
|
||||
}
|
||||
else {
|
||||
hasLimit = queryPart.getFetchClauseExpression() != null;
|
||||
|
|
|
@ -411,7 +411,7 @@ public abstract class AbstractSqlAstTranslator<T extends JdbcOperation> implemen
|
|||
}
|
||||
|
||||
protected boolean hasOffset(QueryPart queryPart) {
|
||||
if ( queryPart.isRoot() && hasLimit() && limit.getFirstRowJpa() != 0 ) {
|
||||
if ( queryPart.isRoot() && hasLimit() && limit.getFirstRow() != null ) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -104,7 +104,7 @@ public class UnspecifiedEnumTypeTest extends BaseEnversFunctionalTestCase {
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
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( "e2", IntegerType.INSTANCE )
|
||||
.list();
|
||||
|
|
Loading…
Reference in New Issue