Question

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

Was it helpful?

Solution

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top