cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1164953 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
Date Sun, 04 Sep 2011 00:55:11 GMT
Author: aadamchik
Date: Sun Sep  4 00:55:11 2011
New Revision: 1164953

URL: http://svn.apache.org/viewvc?rev=1164953&view=rev
Log:
CAY-1611 ObjectContext API improvement - better 'localObect' method

clarifying the differences in implementation of the old method between DataContext and ObjectContext

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java

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=1164953&r1=1164952&r2=1164953&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
Sun Sep  4 00:55:11 2011
@@ -100,7 +100,7 @@ public class DataContext extends BaseCon
             this.objectStore = objectStore;
             objectStore.setContext(this);
         }
-        
+
         if (channel != null) {
             attachToChannel(channel);
         }
@@ -116,7 +116,8 @@ public class DataContext extends BaseCon
      * Creates and returns a new child ObjectContext.
      * 
      * @since 3.0
-     * @deprecated Since 3.1 replaced by {@link DataContextFactory#createContext(DataChannel)}
+     * @deprecated Since 3.1 replaced by
+     *             {@link DataContextFactory#createContext(DataChannel)}
      */
     @Deprecated
     public ObjectContext createChildContext() {
@@ -335,8 +336,9 @@ public class DataContext extends BaseCon
                 ObjAttribute objAttr = property.getAttribute();
 
                 // processing compound attributes correctly
-                snapshot.put(objAttr.getDbAttributePath(), property
-                        .readPropertyDirectly(object));
+                snapshot.put(
+                        objAttr.getDbAttributePath(),
+                        property.readPropertyDirectly(object));
                 return true;
             }
 
@@ -1227,6 +1229,9 @@ public class DataContext extends BaseCon
                 if (prototype != null
                         && ((Persistent) prototype).getPersistenceState() != PersistenceState.HOLLOW)
{
                     localObject.setPersistenceState(PersistenceState.COMMITTED);
+
+                    // *** the only line different from CayenneContext implementation. Not
+                    // clear why it is different?
                     descriptor.injectValueHolders(localObject);
                     descriptor.shallowMerge(prototype, localObject);
                 }



Mime
View raw message