title: mybatis oracle batch update using foreach
body: <p>I'm trying to insert a list of records to an Oracle 11g  table. I tried the MyBatis syntax with foreach but it fails with ORA-00933: SQL command not properly ended exception when the list has more than one record.</p>
  
  <pre><code>The generated sql in this case looks like:
  </code></pre>
  
  <p>UPDATE CUSTOMER_T SET app_name = ?, start_date = ?, end_date = ? WHERE customer_id=?
  UPDATE CUSTOMER_T SET app_name = ?, start_date = ?, end_date = ? WHERE customer_id=? </p>
  
  <pre><code>Below is my the query in the mapper:
  
  &lt;update id="updateApplication" parameterType="com.test.mybatis.Application"&gt;
  
          &lt;foreach item="ca" collection="customer.applications.applcation"
              open="" close="" separator=""&gt;
          UPDATE CUSTOMER_T
          SET app_name = #{ca.appName,jdbcType=VARCHAR},      
          start_date = #{ca.startDate,jdbcType=DATE,javaType=javax.xml.datatype.XMLGregorianCalendar},
          end_date = #{ca.endDate,jdbcType=DATE,javaType=javax.xml.datatype.XMLGregorianCalendar}
          WHERE
          customer_id=#{customer.info.customerid}
          &lt;/foreach&gt;      
      &lt;/update&gt;    
  </code></pre>
  
  <p>I appreciate if someone could identify the issue here.</p>