Is it possible to force NHibernate to generate a query similar to the following using the HQL or API criteria?
select
*
from (
select
row_number() over ( partition by Column1 order by Column2 ) as RowNumber,
T.*
from
MyTable T
)
where
RowNumber = 1
I can get him to make an internal selection using the formula attribute, but I cannot find a way to write an HQL or Criteria query that allows me to wrap the internal selection in the external.
source
share