Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-165

QueryImpl.setFirstResult does not take already set maxResults into account

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.7
    • 1.0.0
    • query
    • None

    Description

      If you want rows 10-19 of some query, the sequence

      q.setFirstResult(10).setMaxResults(10);

      behaves as expected. On the other hand

      q.setMaxResults(10).setFirstResult(10);

      returns the empty list. QueryImpl.setFirstResult should reset the range endpoint. maxResults is a count, not an index.

      Attachments

        Activity

          People

            kwsutter Kevin W. Sutter
            jdf@us.ibm.com Jonathan Feinberg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: