Piotr Findeisen commented on an issue
Hibernate ORM / Bug HHH-6914
SQL Server: Query with limit fails for HQL with ORDER BY over select clause alias
If the HQL like:
{code}
SELECT u.id AS id, u.login AS login FROM User u
{code}
is executed with limit and offset, then {{SQLServer2008Dialect}} produces SQL like
{code}
WITH query AS (select ROW_NUMBER() OVER (order by col_1) as __hibernate_row_nr__, user.id as col_0, user.login as col_1 from users user ) SELECT * FROM query WHERE __hibernate_row_nr__ BET...