openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ss...@apache.org
Subject svn commit: r489750 - /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionAttachStrategy.java
Date Fri, 22 Dec 2006 20:38:01 GMT
Author: ssegu
Date: Fri Dec 22 12:38:01 2006
New Revision: 489750

URL: http://svn.apache.org/viewvc?view=rev&rev=489750
Log:
Reset the SM to the old value, instead of nulling out.

Modified:
    incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionAttachStrategy.java

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionAttachStrategy.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionAttachStrategy.java?view=diff&rev=489750&r1=489749&r2=489750
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionAttachStrategy.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/VersionAttachStrategy.java
Fri Dec 22 12:38:01 2006
@@ -119,6 +119,7 @@
 
         // assign the detached pc the same state manager as the object we're
         // copying into during the attach process
+        StateManager smBefore = pc.pcGetStateManager();
         pc.pcReplaceStateManager(sm);
         int detach = (isNew) ? DETACH_ALL : broker.getDetachState();
         FetchConfiguration fetch = broker.getFetchConfiguration();
@@ -139,7 +140,7 @@
                 }
             }
         } finally {
-            pc.pcReplaceStateManager(null);
+            pc.pcReplaceStateManager(smBefore);
         }
         if (!embedded && !isNew)
             compareVersion(sm, pc);



Mime
View raw message