OpenJPA
  1. OpenJPA
  2. OPENJPA-1575

Query parameter on externalized field breaks Prepared Query Cache

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-beta2
    • Fix Version/s: 2.0.0-beta3
    • Component/s: kernel, query
    • Labels:
      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.

        Issue Links

          Activity

          Michael Dick made changes -
          Link This issue is duplicated by OPENJPA-1941 [ OPENJPA-1941 ]
          Donald Woods made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Donald Woods made changes -
          Fix Version/s 2.0.0-beta3 [ 12314857 ]
          Fix Version/s 2.0.0 [ 12314019 ]
          Pinaki Poddar made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Pinaki Poddar created issue -

            People

            • Assignee:
              Pinaki Poddar
              Reporter:
              Pinaki Poddar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development