title: Insert a list of objects using MyBatis 3
body: <p>I've tried to insert a list in a database but I've got some the error: org.springframework.jdbc.BadSqlGrammarException: SqlSession operation; bad SQL grammar []; nested exception is java.sql.SQLException: ORA-00913: too many values (...).</p>
  
  <p>The code that I've used:</p>
  
  <pre><code>&lt;insert id="insertListMyObject" parameterType="java.util.List" &gt;
  INSERT INTO my_table
     (ID_ITEM,
      ATT1,
      ATT2)
      VALUES
     &lt;foreach collection="list" item="item" index="index" open="(" close=")" separator=","&gt;
      #{item.idItem, jdbcType=BIGINT},
      #{item.att1, jdbcType=INTEGER},
      #{item.att2, jdbcType=STRING}
         &lt;/foreach&gt;   
  &lt;/insert&gt;
  </code></pre>
  
  <p>My dao cals the method:</p>
  
  <pre><code>SqlSessionTemplate().insert(MAPPER+".insertListMyObject", parameterList);
  </code></pre>
  
  <p>Where the parameterList is:</p>
  
  <pre><code>List&lt;MyObjects&gt;.
  </code></pre>
  
  <p>Does someone have a clue about what's this error? Or if does exists a better way to do multiples inserts operation.</p>
  
  <p>Many thanks!</p>