Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1110

fetchLimit + DistinctResultIterator = fewer rows in the result

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0M5
    • Core Library
    • None

    Description

      I don't have a test case yet, but I noticed in a SelectQuery with implicit DISTINCT (due to a qualifier on to-many), if the root entity has columns that force Cayenne into outside-of-db distinct check (e.g. CLOB columns), I am getting fewer results than the fetch limit. This is due to fetch limit being applied inside the inner result iterator (JDBCResultIterator) not the outer filtering iterator (DistinctResultIterator)

      Attachments

        1. test_v_2.txt
          13 kB
          dzmitar
        2. limitIterator.txt
          16 kB
          dzmitar
        3. limitIterator_1.txt
          18 kB
          dzmitar
        4. limit.txt
          17 kB
          dzmitar

        Activity

          People

            andrus Andrus Adamchik
            andrus Andrus Adamchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: