openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r661090 - /openjpa/branches/1.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/AbstractVersionStrategy.java
Date Wed, 28 May 2008 21:19:47 GMT
Author: awhite
Date: Wed May 28 14:19:47 2008
New Revision: 661090

URL: http://svn.apache.org/viewvc?rev=661090&view=rev
Log:
Change default return value of AbstractVersionStrategy.checkVersion to 
something that will force an update on refresh, but won't result in an
optimistic exception on flush.  This is a more appropriate default for
derived strategies that don't override cehckVersion (currently only the
NoneVersionStrategy of the builtins).  


Modified:
    openjpa/branches/1.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/AbstractVersionStrategy.java

Modified: openjpa/branches/1.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/AbstractVersionStrategy.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/AbstractVersionStrategy.java?rev=661090&r1=661089&r2=661090&view=diff
==============================================================================
--- openjpa/branches/1.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/AbstractVersionStrategy.java
(original)
+++ openjpa/branches/1.1.x/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/AbstractVersionStrategy.java
Wed May 28 14:19:47 2008
@@ -63,7 +63,7 @@
     public boolean checkVersion(OpenJPAStateManager sm, JDBCStore store,
         boolean updateVersion)
         throws SQLException {
-        return false;
+        return !updateVersion;
     }
 
     public int compareVersion(Object v1, Object v2) {



Mime
View raw message