openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r492820 - /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
Date Fri, 05 Jan 2007 00:00:10 GMT
Author: awhite
Date: Thu Jan  4 16:00:10 2007
New Revision: 492820

URL: http://svn.apache.org/viewvc?view=rev&rev=492820
Log:
Allow refresh of new-flushed instances.


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

Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java?view=diff&rev=492820&r1=492819&r2=492820
==============================================================================
--- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
(original)
+++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/StateManagerImpl.java
Thu Jan  4 16:00:10 2007
@@ -1063,8 +1063,11 @@
         // note: all logic placed here rather than in the states for
         // optimization; this method public b/c used by remote package
 
-        // nothing to do for non persistent or new instances
-        if (!isPersistent() || isNew())
+        // nothing to do for non persistent or new unflushed instances
+        // (we allow new flushed instances to pass through in case of 
+        // uncommitted read, and because it allows ordered fields to be re-read
+        // and therefore re-ordered from the store)
+        if (!isPersistent() || (isNew() && !isFlushed()))
             return false;
 
         lock();



Mime
View raw message