openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hthom...@apache.org
Subject svn commit: r1756957 - in /openjpa/branches/2.2.x: ./ openjpa-kernel/src/main/java/org/apache/openjpa/datacache/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/p...
Date Fri, 19 Aug 2016 18:53:29 GMT
Author: hthomann
Date: Fri Aug 19 18:53:29 2016
New Revision: 1756957

URL: http://svn.apache.org/viewvc?rev=1756957&view=rev
Log:
OPENJPA-2245: NotSerializableException when using a remote QueryCache and the Criteria API.
 Back ported to 2.2.x Rick Curtis' changes in trunk.

Added:
    openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestRemoteQueryCacheCriteriaQuery.java
      - copied unchanged from r1368438, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/criteria/TestRemoteQueryCacheCriteriaQuery.java
    openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/SerializingConcurrentQueryCache.java
      - copied unchanged from r1368438, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/SerializingConcurrentQueryCache.java
Modified:
    openjpa/branches/2.2.x/   (props changed)
    openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java

Propchange: openjpa/branches/2.2.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 19 18:53:29 2016
@@ -2,4 +2,4 @@
 /openjpa/branches/2.0.x:1484136,1484287,1504611
 /openjpa/branches/2.1.x:1415379,1415398,1469090,1469949,1484300,1484313,1485010,1505837,1513249,1517838,1529241,1530146,1533218,1533280,1539188,1569528,1575444,1591536,1614935,1636464,1648430,1655218,1662610,1673300,1673491,1686894,1709201,1709309,1750036
 /openjpa/branches/2.2.1.x:1415367,1415413,1415425,1469408,1470097,1484320,1484322,1491895,1504719,1529267,1529340,1530347,1531176,1533222,1539193,1584153,1648450,1651808,1686910
-/openjpa/trunk:1416742,1420324,1430117,1431649,1436957,1436960,1448662,1448796,1451369,1456574,1456614,1459091,1461833,1469646,1469649,1469652,1504282,1558594,1564989,1600682,1600757,1603251,1626287,1632647
+/openjpa/trunk:1368438,1416742,1420324,1430117,1431649,1436957,1436960,1448662,1448796,1451369,1456574,1456614,1459091,1461833,1469646,1469649,1469652,1504282,1558594,1564989,1600682,1600757,1603251,1626287,1632647

Modified: openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java
URL: http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java?rev=1756957&r1=1756956&r2=1756957&view=diff
==============================================================================
--- openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java
(original)
+++ openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryKey.java
Fri Aug 19 18:53:29 2016
@@ -245,9 +245,9 @@ public class QueryKey
         key._accessPathClassNames = accessPathClassNames;
         key._timeout = timeout;
         key._query = q.getQueryString();
-        if (key._query == null) {
-            // this can be a criteria query
-            key._query = parsed;
+        if (key._query == null && parsed != null) {
+            // this is a criteria query. Store the Stringified query value rather than the
full cq.
+            key._query = parsed.toString();
         }
         key._ignoreChanges = q.getIgnoreChanges();
         key._rangeStart = startIdx;



Mime
View raw message