cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1098680 - /cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/jdbc/UpdateTemplate.java
Date Mon, 02 May 2011 17:34:51 GMT
Author: aadamchik
Date: Mon May  2 17:34:51 2011
New Revision: 1098680

URL: http://svn.apache.org/viewvc?rev=1098680&view=rev
Log:
must commit after execute , otheriwise the new data may not be immediately visible to the
tests

Modified:
    cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/jdbc/UpdateTemplate.java

Modified: cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/jdbc/UpdateTemplate.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/jdbc/UpdateTemplate.java?rev=1098680&r1=1098679&r2=1098680&view=diff
==============================================================================
--- cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/jdbc/UpdateTemplate.java
(original)
+++ cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/jdbc/UpdateTemplate.java
Mon May  2 17:34:51 2011
@@ -72,13 +72,17 @@ class UpdateTemplate {
 
             PreparedStatement st = c.prepareStatement(sql);
 
+            int count;
             try {
                 bindParameters(st, bindings, bindingTypes);
-                return st.executeUpdate();
+                count = st.executeUpdate();
             }
             finally {
                 st.close();
             }
+
+            c.commit();
+            return count;
         }
         finally {
             c.close();



Mime
View raw message