Index: nhibernate/src/NHibernate/Param/QueryTakeParameterSpecification.cs
===================================================================
--- nhibernate/src/NHibernate/Param/QueryTakeParameterSpecification.cs	(revision 6004)
+++ nhibernate/src/NHibernate/Param/QueryTakeParameterSpecification.cs	(working copy)
@@ -37,7 +37,7 @@
 			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);
 			}
posted on 2012-12-07 21:43  virtual_garden  阅读(168)  评论(0编辑  收藏  举报