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();


Reply via email to