openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <>
Subject [jira] Created: (OPENJPA-671) QueryCache can hinder the change in FetchPlan to take effect
Date Thu, 31 Jul 2008 03:58:31 GMT
QueryCache can hinder the change in FetchPlan to take effect

                 Key: OPENJPA-671
             Project: OpenJPA
          Issue Type: Bug
            Reporter: Pinaki Poddar

>From OpenJPA manual:
"The query cache is enabled by default when the data cache is enabled. ...
When you run a query, OpenJPA assembles a key based on the query properties and the parameters
used at execution time, and checks for a cached query result. If one is found, the object
ids in the cached result are looked up, and the resultant persistence-capable objects are
returned. Otherwise, the query is executed against the database, and the object ids loaded
by the query are put into the cache."

Consider two queries Q1 and Q2 that *only* differ in their fetch plan F1 and F2. This implies
QueryKey(Q1) = QueryKey(Q2) because QueryKey does not consider the fetch plan associated with
a Query. 
After Q1 is executed and its results cached, if Q2 is invoked, then OpenJPA considers it to
be a cache hit and Q2 is not executed at all effectively ignoring F2.    

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message