Paging with SetFirstResult and SetMaxResults with Named SQL queries in NHibernate does not work when query get a bit complicated. It works for first page but does not work with other pages. Others like:
http://stackoverflow.com/questions/2201125/active-record-or-nhibernate-generating-invalid-sql-for-paging-on-sqlquery and http://groups.google.com/group/nhusers/browse_thread/thread/ee7b21f578718dea/209a0ff6ed4d2b21?lnk=gst&q=+Possible+SQL+Server+bug+#209a0ff6ed4d2b21 have encountered this before. But I didn't realized what's the root cause. Does anybody knows why this happens and how can it be stopped? I found a work-around myself: http://afsharm.blogspot.com/2010/11/paging-problem-with-named-sql-queries.html But still loves to know the root cause and the real solution. Regards, Afshar Mohebbi -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
