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

Query parameter on externalized field breaks Prepared Query Cache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-beta2
    • 2.0.0-beta3
    • kernel, query
    • None

    Description

      If field value has been externalized and the query is using a parameter for that field, caching its SQL breaks because re-parametrization of the SQL can not externalize the user supplied parameter value through the field. The worse is the query is cached anyway and its parameter substituted with (wrong) non-externalized, user-supplied value – resulting in wrong result.
      Currently we will detect such usage and exclude the the query being cached.
      However, we can consider a mechanics to capture the parametrized fields in a query expression tree and appropriately pass the user values through the fields' externalizer in future.

      Attachments

        Issue Links

          Activity

            People

              ppoddar@apache.org Pinaki Poddar
              ppoddar@apache.org Pinaki Poddar
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: