Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix NH-2840 - SetFirstResult and SetMaxResults do not work correctly …

…on Oracle (ODP.NET) (re-applied with corrected line endings)

Fixes the following tests on Oracle:

NHibernate.Test.Criteria.CriteriaQueryTest.SimplePagination
NHibernate.Test.Criteria.Lambda.IntegrationFixture.RowCount
NHibernate.Test.Legacy.FooBarTest.Limit
NHibernate.Test.Legacy.FooBarTest.PSCache
NHibernate.Test.Legacy.SQLFunctionsTest.SQLFunctions
NHibernate.Test.NHSpecificTest.NH1533.Fixture.Can_query_using_two_orderby_and_limit_altogether
NHibernate.Test.NHSpecificTest.NH2251.Fixture.FuturePagedHql
NHibernate.Test.NHSpecificTest.NH2251.Fixture.HqlWithOffsetAndLimit
NHibernate.Test.NHSpecificTest.NH2251.Fixture.MultiplePagingParametersInSingleQuery
NHibernate.Test.Pagination.PaginationFixture.PagTest
NHibernate.Test.QueryTest.DetachedQueryFixture.ExecutableQuery
  • Loading branch information...
commit 86646016f7ffa5f2d94d0d6446a5a901a2e25990 1 parent 5fe16c8
Richard Brown FlukeFan authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/NHibernate/Param/QueryTakeParameterSpecification.cs
2  src/NHibernate/Param/QueryTakeParameterSpecification.cs
View
@@ -37,7 +37,7 @@ public void Bind(IDbCommand command, IList<Parameter> multiSqlQueryParametersLis
if (effectiveParameterLocations.Any())
{
// if the dialect does not support variable limits the parameter may was removed
- int value = queryParameters.RowSelection.MaxRows;
+ int value = Loader.Loader.GetLimitUsingDialect(queryParameters.RowSelection, session.Factory.Dialect) ?? queryParameters.RowSelection.MaxRows;
int position = effectiveParameterLocations.Single();
type.NullSafeSet(command, value, position, session);
}
Please sign in to comment.
Something went wrong with that request. Please try again.