cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r614492 - in /cayenne/main/trunk: docs/doc/src/main/resources/RELEASE-NOTES.txt framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ClientEntityResolver.java
Date Wed, 23 Jan 2008 11:08:43 GMT
Author: aadamchik
Date: Wed Jan 23 03:08:39 2008
New Revision: 614492

URL: http://svn.apache.org/viewvc?rev=614492&view=rev
Log:
CAY-976 EntityResolver Fault dependency leads to ClassNotFound on the ROP client - trunk fix

Modified:
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ClientEntityResolver.java

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=614492&r1=614491&r2=614492&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Wed Jan 23 03:08:39 2008
@@ -64,6 +64,7 @@
 CAY-932 Cancel doesn't cancel when quitting CM with a modified model
 CAY-967 Caching doesn't work for paginated queries
 CAY-974 Subquery EJBQL returns wrong entity in the result
+CAY-976 EntityResolver Fault dependency leads to ClassNotFound on the ROP client
 
 ----------------------------------
 Release: 3.0M2

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ClientEntityResolver.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ClientEntityResolver.java?rev=614492&r1=614491&r2=614492&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ClientEntityResolver.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ClientEntityResolver.java
Wed Jan 23 03:08:39 2008
@@ -19,6 +19,8 @@
 package org.apache.cayenne.map;
 
 import org.apache.cayenne.reflect.ClassDescriptorFactory;
+import org.apache.cayenne.reflect.ClassDescriptorMap;
+import org.apache.cayenne.reflect.valueholder.ValueHolderDescriptorFactory;
 
 /**
  * An EntityResolver subclass that uses a different default {@link ClassDescriptorFactory}
@@ -35,5 +37,29 @@
     @Override
     public EntityResolver getClientEntityResolver() {
         return this;
+    }
+
+    @Override
+    public ClassDescriptorMap getClassDescriptorMap() {
+
+        if (classDescriptorMap == null) {
+            ClassDescriptorMap classDescriptorMap = new ClassDescriptorMap(this);
+
+            classDescriptorMap.addFactory(new ValueHolderDescriptorFactory(
+                    classDescriptorMap));
+
+            // since ClassDescriptorMap is not synchronized, we need to prefill it with
+            // entity proxies here.
+            for (DataMap map : maps) {
+                for (String entityName : map.getObjEntityMap().keySet()) {
+                    classDescriptorMap.getDescriptor(entityName);
+                }
+            }
+
+            this.classDescriptorMap = classDescriptorMap;
+        }
+
+        return classDescriptorMap;
+
     }
 }



Mime
View raw message