SetFirstResult and SetMaxResults do not work correctly on Oracle (ODP.NET)

Description

Using ODP.NET, create an IQuery and invoke .SetFirstResult(3) and .SetMaxResults(5). This should fetch 8 records, then skip the first 3 records, and then take the next 5 records. Instead, it fetches only 5 records, then skips the first 3, and then returns only 2. The resulting query looks like this:

select col1, col2, ...
from (
select col1, col2, ...
order by col1, col2, ...
)
where rownum <=5

The where-clause should compare to 8, not 5.

This worked fine in NHib 3.1.0.

I would create a unit test, but this is an Oracle-specific bug.

Environment

None

Activity

Show:

Oskar Berggren 
May 30, 2012 at 6:31 PM

Closing issues fixed in 3.3.1.CR1.

Richard Brown 
August 24, 2011 at 11:52 AM

Duplicate

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created August 23, 2011 at 12:13 AM
Updated July 8, 2015 at 4:44 AM
Resolved August 24, 2011 at 11:52 AM
Who's Looking?