You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by mk...@apache.org on 2013/11/15 22:35:38 UTC
svn commit: r1542406 -
/cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/access/DataDomainQueryAction.java
Author: mkienenb
Date: Fri Nov 15 21:35:38 2013
New Revision: 1542406
URL: http://svn.apache.org/r1542406
Log:
CAY-1880 - objectStore snapshots never cleared from RefreshQuery when use-shared-cache unchecked
Modified:
cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/access/DataDomainQueryAction.java
Modified: cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/access/DataDomainQueryAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/access/DataDomainQueryAction.java?rev=1542406&r1=1542405&r2=1542406&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/access/DataDomainQueryAction.java (original)
+++ cayenne/main/trunk/framework/cayenne-core-unpublished/src/main/java/org/apache/cayenne/access/DataDomainQueryAction.java Fri Nov 15 21:35:38 2013
@@ -266,6 +266,9 @@ class DataDomainQueryAction implements Q
// not sending any events - peer contexts will not get refreshed
if (domain.getSharedSnapshotCache() != null) {
domain.getSharedSnapshotCache().clear();
+ } else {
+ // remove snapshots from local ObjectStore only
+ context.getObjectStore().getDataRowCache().clear();
}
context.getQueryCache().clear();
@@ -287,7 +290,11 @@ class DataDomainQueryAction implements Q
// send an event for removed snapshots
domain.getSharedSnapshotCache().processSnapshotChanges(context.getObjectStore(),
Collections.EMPTY_MAP, Collections.EMPTY_LIST, ids, Collections.EMPTY_LIST);
- }
+ } else {
+ // remove snapshots from local ObjectStore only
+ context.getObjectStore().getDataRowCache().processSnapshotChanges(context.getObjectStore(),
+ Collections.EMPTY_MAP, Collections.EMPTY_LIST, ids, Collections.EMPTY_LIST);
+ }
GenericResponse response = new GenericResponse();
response.addUpdateCount(1);