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

QuerySQLCache fails to exclude paginated queries on cache hit

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.2
    • Fix Version/s: None
    • Component/s: query
    • Labels:

      Description

      While testing another issue, I encountered a bug with the QuerySQLCache. If you execute JPQL that has query pagination, we recognize that and exclude the query from the cache[1]. If you execute the query once without pagination, then execute it again with pagination we will 'forget' about the pagination and return the entire result set. I'll attach a JUnit showing the issue.

      [1] 1864 test WARN [main] openjpa.Runtime - Query "select e from simple e WHERE e.name=:name order by e.value" is removed from cache excluded permanently. The following query is not cached because the query uses pagination: select e from simple e WHERE e.name=:name order by e.value.

        Attachments

        1. OPENJPA-2512.20x.ut.patch
          2 kB
          Richard G. Curtis

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              curtisr7 Richard G. Curtis
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: