cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From and...@apache.org
Subject svn commit: r919376 - in /cayenne/main/trunk: docs/doc/src/main/resources/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/ framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/
Date Fri, 05 Mar 2010 11:12:17 GMT
Author: andrey
Date: Fri Mar  5 11:12:17 2010
New Revision: 919376

URL: http://svn.apache.org/viewvc?rev=919376&view=rev
Log:
CAY-1400 lazyInitParentDomainName will become null when using Child Context

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/access/DataContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSerializationTest.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=919376&r1=919375&r2=919376&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 Fri Mar  5 11:12:17 2010
@@ -55,6 +55,7 @@
 CAY-1390 DataRowStore.processRemoteEvent processInvalidatedIDs typo
 CAY-1396 merge: unneeded cast to SQLServerAdapter
 CAY-1397 ROP: Missing the COMMIT state when deleting HOLLOW object
+CAY-1400 lazyInitParentDomainName will become null when using Child Context
 
 ----------------------------------
 Release: 3.0 RC 2

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java?rev=919376&r1=919375&r2=919376&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
Fri Mar  5 11:12:17 2010
@@ -1199,7 +1199,8 @@
         Object value = in.readObject();
         if (value instanceof DataChannel) {
             // A real QueryEngine object - use it
-            this.channel = (DataChannel) value;
+            // call a setter to initialize EntityResolver 
+            setChannel((DataChannel) value);
         }
         else if (value instanceof String) {
             // The name of a DataDomain - use it

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSerializationTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSerializationTest.java?rev=919376&r1=919375&r2=919376&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSerializationTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextSerializationTest.java
Fri Mar  5 11:12:17 2010
@@ -23,6 +23,7 @@
 
 import org.apache.art.Artist;
 import org.apache.cayenne.Cayenne;
+import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.PersistenceState;
 import org.apache.cayenne.conf.Configuration;
 import org.apache.cayenne.unit.CayenneCase;
@@ -71,6 +72,16 @@
         assertNotNull(deserializedContext.getChannel());
         assertSame(context.getChannel(), deserializedContext.getChannel());
     }
+    
+    public void testSerializeNestedChannel() throws Exception {
+        DataContext context = createDataContextWithSharedCache();
+        ObjectContext child = context.createChildContext();
+
+        ObjectContext deserializedContext = (ObjectContext) Util.cloneViaSerialization(child);
+
+        assertNotNull(deserializedContext.getChannel());
+        assertNotNull(deserializedContext.getEntityResolver());
+    }
 
     public void testSerializeWithSharedCache() throws Exception {
         



Mime
View raw message