openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r665915 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
Date Mon, 09 Jun 2008 22:02:13 GMT
Author: allee8285
Date: Mon Jun  9 15:02:12 2008
New Revision: 665915

URL: http://svn.apache.org/viewvc?rev=665915&view=rev
Log:
OPENJPA-630 Enforce no statement batching support if batchlimit set to 1.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java?rev=665915&r1=665914&r2=665915&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/BatchingPreparedStatementManagerImpl.java
Mon Jun  9 15:02:12 2008
@@ -117,7 +117,8 @@
      */
     private boolean isBatchDisabled(RowImpl row) {
         boolean rtnVal = true;
-        if (getBatchLimit() != 0 && !isBatchDisabled()) {
+        int limit = getBatchLimit();
+        if ((limit < 0 || limit > 1) && !isBatchDisabled()) {
             OpenJPAStateManager sm = row.getPrimaryKey();
             ClassMapping cmd = null;
             if (sm != null)



Mime
View raw message