cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r464097 - in /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access: DataContextQueryAction.java ObjectStore.java
Date Sun, 15 Oct 2006 02:09:52 GMT
Author: aadamchik
Date: Sat Oct 14 19:09:50 2006
New Revision: 464097

URL: http://svn.apache.org/viewvc?view=rev&rev=464097
Log:
CAY-693: DataContext should not return HOLLOW objects in response to ObjectIdQuery()

Modified:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContextQueryAction.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContextQueryAction.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContextQueryAction.java?view=diff&rev=464097&r1=464096&r2=464097
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContextQueryAction.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContextQueryAction.java
Sat Oct 14 19:09:50 2006
@@ -84,6 +84,10 @@
                         object = ((DataContext) actingContext)
                                 .currentSnapshot((DataObject) object);
                     }
+                    // do not return hollow objects
+                    else if (((Persistent) object).getPersistenceState() == PersistenceState.HOLLOW)
{
+                        return !DONE;
+                    }
 
                     this.response = new ListResponse(object);
                     return DONE;

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java?view=diff&rev=464097&r1=464096&r2=464097
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
Sat Oct 14 19:09:50 2006
@@ -667,20 +667,7 @@
             // handle deleted object
             if (results.size() == 0) {
                 processDeletedID(object.getObjectId());
-            }
-            else if (object.getPersistenceState() == PersistenceState.HOLLOW) {
-
-                // if HOLLOW is returned (from parent DC?), rerun the query with forced
-                // fetch
-                query = new ObjectIdQuery(
-                        object.getObjectId(),
-                        false,
-                        ObjectIdQuery.CACHE_REFRESH);
-                results = context.getChannel().onQuery(context, query).firstList();
-                if (results.size() == 0) {
-                    processDeletedID(object.getObjectId());
-                }
-            }
+            }       
         }
     }
 



Mime
View raw message