Allow refresh of new-flushed instances.

git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@492820 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
A. Abram White 2007-01-05 00:00:10 +00:00
parent 663fbe62e3
commit 61c87ac3a1
1 changed files with 5 additions and 2 deletions

View File

@ -1063,8 +1063,11 @@ public class StateManagerImpl
// 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();