Thursday, April 21, 2011

paged data using a CTE, how would nHibernate handle this?

Hi,

I use CTE to handle paging of data currently, can criteria queries handle CTE?

From stackoverflow
  • IIRC, nhibernate uses a CTE when paging on 2005+, so a query which is paged will result in a CTE using query for the paging. This is logical, as there's no other way of doing paging on sqlserver 2005/2008 unless you want to use temptables. (no, rownumber tricks and the like don't work in all cases, o/r mappers need to work with paging systems which work always)

0 comments:

Post a Comment