Uploaded image for project: 'iBatis for Java [READ ONLY]'
  1. iBatis for Java [READ ONLY]
  2. IBATIS-200

The method executor.executeBatch() always returns 0.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.1.0
    • None
    • Core
    • None
    • SUN JVM 1.4.2 On Windows

    Description

      I am using Sql Maps 2.1.5 with Spring 1.2.4.
      I have a method as following.
      I want to get the number of rows updated in the batch .
      But it always returns 0.

      public int insertBatchError(final List batchErrorList) {

      Integer count = (Integer) getSqlMapClientTemplate().execute(new SqlMapClientCallback() {
      public Object doInSqlMapClient(SqlMapExecutor executor) throws SQLException {
      executor.startBatch();
      for (int i = 0; i < batchErrorList.size(); i++)

      { BatchErrorDTO batchErrorDto = (BatchErrorDTO) batchErrorList.get(i); executor.update("insertBatchError", batchErrorDto); }


      int count = executor.executeBatch();
      return new Integer(count);
      }
      });

      return count.intValue();

      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mou daikei mou
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: