Uploaded image for project: 'NHibernate [Moved to GitHub]'
  1. NH-2853

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 3.2.0.GA
    • Fix Version/s: 3.3.0.CR1
    • Labels:
      None
    • Sprint:

      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.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                flukefan Richard Brown
                Reporter:
                brianberns Brian Berns
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Who's Looking?