cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r454227 - /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
Date Sun, 08 Oct 2006 22:34:26 GMT
Author: aadamchik
Date: Sun Oct  8 15:34:26 2006
New Revision: 454227

URL: http://svn.apache.org/viewvc?view=rev&rev=454227
Log:
CAY-680 - more refactoring - using common old algorithm for simple property changes in ObjectStore

Modified:
    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/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=454227&r1=454226&r2=454227
==============================================================================
--- 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
Sun Oct  8 15:34:26 2006
@@ -1037,16 +1037,9 @@
             String property,
             Object oldValue,
             Object newValue) {
-
-        synchronized (this) {
-            ObjectDiff objectDiff = (ObjectDiff) changes.get(nodeId);
-            if (objectDiff == null) {
-                Persistent object = (Persistent) getNode(nodeId);
-                objectDiff = new ObjectDiff(this, object);
-                objectDiff.setDiffId(++currentDiffId);
-                changes.put(nodeId, objectDiff);
-            }
-        }
+        
+        Persistent object = (Persistent) getNode(nodeId);
+        registerDiff(object, null);
     }
 
     /**



Mime
View raw message