MsSqlServer dialects reject custom SQL Server queries with limits

Description

When retrieving data from SQL Server using a custom SQL query, a NotSupportedException is thrown when the query does not start with SELECT or SELECT DISTINCT. This behaviour prevents the use of paging when using stored procedures. It also prevents the use common table expressions in custom SQL Server queries.

Environment

None

Activity

Show:

Alex Zaytsev September 30, 2012 at 8:29 PM

Fix commited to master 65ac675ff3a9271ca74f56be5601d1473266f34d

Oskar Berggren January 17, 2012 at 9:55 AM

seems to be another problem that occurs due to limitations in todays SQL parsing in this area.

Gerke Geurts December 22, 2011 at 11:55 AM

Pull request with test case and patches at https://github.com/nhibernate/nhibernate-core/pull/40

Fixed

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created December 15, 2011 at 2:33 PM
Updated September 21, 2014 at 12:40 PM
Resolved September 30, 2012 at 8:29 PM
Who's Looking?