openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r1152901 - in /openjpa/branches/1.2.x: openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/flush/
Date Mon, 01 Aug 2011 19:22:51 GMT
Author: mikedd
Date: Mon Aug  1 19:22:50 2011
New Revision: 1152901

URL: http://svn.apache.org/viewvc?rev=1152901&view=rev
Log:
Revert "OPENJPA-2006: If flushing, also pre-flush non-provisional entities to allow sequence
ID population - applied Jeremy's 1.2.x patch."

This reverts commit 4135a6175d1e652b700442b4ef2c87422bb1824e.

Removed:
    openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/flush/Assignment.java
    openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/flush/ClassPeriod.java
    openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/flush/Course.java
    openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/flush/SubTopic.java
    openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/flush/TestCascadingFlush.java
    openjpa/branches/1.2.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/flush/Topic.java
Modified:
    openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
    openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/SingleFieldManager.java

Modified: openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java?rev=1152901&r1=1152900&r2=1152901&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
(original)
+++ openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/BrokerImpl.java
Mon Aug  1 19:22:50 2011
@@ -1963,10 +1963,8 @@ public class BrokerImpl
         try {
             if (flush) {
                 // call pre store on all currently transactional objs
-                for (Iterator itr = transactional.iterator(); itr.hasNext();) {
-                	StateManagerImpl sm = (StateManagerImpl) itr.next();
-                    sm.beforeFlush(reason, _call);
-                }
+                for (Iterator itr = transactional.iterator(); itr.hasNext();)
+                    ((StateManagerImpl) itr.next()).beforeFlush(reason, _call);
                 flushAdditions(transactional, reason);
             }
 
@@ -4788,8 +4786,4 @@ public class BrokerImpl
             throw new ObjectExistsException(_loc.get("cache-exists",
                 obj.getClass().getName(), id)).setFailedObject(obj);
     }
-    
-    protected boolean isFlushing() {
-    	return ((_flags & FLAG_FLUSHING) != 0);
-    }
 }

Modified: openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/SingleFieldManager.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/SingleFieldManager.java?rev=1152901&r1=1152900&r2=1152901&view=diff
==============================================================================
--- openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/SingleFieldManager.java
(original)
+++ openjpa/branches/1.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/SingleFieldManager.java
Mon Aug  1 19:22:50 2011
@@ -762,16 +762,9 @@ class SingleFieldManager
             sm = _broker.getStateManager(obj);
             if (sm == null || !sm.isProvisional()) { 
                 sm = _broker.persist(obj, null, true, call);
-
                 // ensure generated IDs get assigned properly
                 if (!logical)
                     ((StateManagerImpl)sm).assignObjectId(false, true);
-
-                // Call preFetch on this and any related persistent fields.
-                // This will ensure IDs get assigned to those that need them.
-                if (_broker.isFlushing()) {
-                	((StateManagerImpl)sm).preFlush(logical, call);
-                }
             }
         }
 



Mime
View raw message