openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hthom...@apache.org
Subject svn commit: r1702145 - in /openjpa/branches/2.2.1.x: ./ openjpa-kernel/src/main/java/org/apache/openjpa/datacache/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/querycache/
Date Thu, 10 Sep 2015 01:49:20 GMT
Author: hthomann
Date: Thu Sep 10 01:49:20 2015
New Revision: 1702145

URL: http://svn.apache.org/r1702145
Log:
OPENJPA-2586: Fix to return proper relationship data when QueryCache and FetchPlans are used.

Added:
    openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/querycache/QCEntityM2O.java
      - copied unchanged from r1702143, openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/querycache/QCEntityM2O.java
    openjpa/branches/2.2.1.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/querycache/TestQueryCacheWithDataCache.java
      - copied unchanged from r1702143, openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/querycache/TestQueryCacheWithDataCache.java
Modified:
    openjpa/branches/2.2.1.x/   (props changed)
    openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java

Propchange: openjpa/branches/2.2.1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Sep 10 01:49:20 2015
@@ -1,5 +1,5 @@
 /openjpa/branches/1.0.x:736493
 /openjpa/branches/2.0.x:1419659,1484136,1484287,1504611
 /openjpa/branches/2.1.x:1415379,1415398,1436150,1469090,1469949,1484300,1484313,1485010,1505837,1513249,1517838,1529241,1530146,1533218,1533280,1539188,1569528,1575444,1591536,1614935,1636464,1648430,1655218,1662610,1673300,1673491,1686894
-/openjpa/branches/2.2.x:1580898,1580939,1591681,1641906,1642555
+/openjpa/branches/2.2.x:1580898,1580939,1591681,1641906,1642555,1702143
 /openjpa/trunk:1416742,1420324,1430117,1431649,1436957,1436960,1448662,1448796,1451369,1456574,1456614,1459091,1461833,1469646,1469649,1469652,1504282,1600757,1603251

Modified: openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java?rev=1702145&r1=1702144&r2=1702145&view=diff
==============================================================================
--- openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
(original)
+++ openjpa/branches/2.2.1.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
Thu Sep 10 01:49:20 2015
@@ -340,6 +340,13 @@ public class QueryCacheStoreQuery
             // Create a new FetchConfiguration that will be used to ensure that any JOIN
FETCHed fields are loaded
             StoreContext store = q.getContext().getStoreContext();
             FetchConfiguration cacheFc = store.pushFetchConfiguration();
+
+            // OPENJPA-2586: If the FetchConfig for this executor contains fields,
+            // then add them to the new FetchConfig.
+            if (!_fc.getFields().isEmpty()) {
+              cacheFc.addFields(_fc.getFields());
+            }
+
             for (QueryExpressions qe : _ex.getQueryExpressions()) {
                 for (String fetchFields : qe.fetchPaths) {
                     cacheFc.addField(fetchFields);



Mime
View raw message