OPENJPA-630 Enforce no statement batching support if batchlimit set to 1.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@665915 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Albert Lee 2008-06-09 22:02:12 +00:00
parent a4d905f345
commit 110e3ff4b0
1 changed files with 2 additions and 1 deletions

View File

@ -117,7 +117,8 @@ public class BatchingPreparedStatementManagerImpl extends
*/
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)