title: Unable to store Enum in batch way with spring-jdbc NamedParameterJdbcTemplate
body: <p>I'm facing a enum problem with spring-jdbc. I have a POJO wich contains an enum value. I want to store the string value in database, not the ordinal. I made a DAO and it's work well except for batch methods with a namedParameterJdbcTemplate (for jdbcTemplate and BatchPreparedStatementSetter it works but i prefer to use named parameters).</p>
  
  <p>For instance:</p>
  
  <pre><code>public int[] batchUpdate(List&lt;MyPojo&gt; pojos) throws DaoException {
      SqlParameterSource[] parameters = new SqlParameterSource[pojos.size()];
  
      for (int i = 0; i &lt; pojos.size(); i++) {
          parameters[i] = new BeanPropertySqlParameterSource(pojos.get(i));
      }
  
      try {
          return namedParameterJdbcTemplate.batchUpdate(SQL_UPDATE, (SqlParameterSource[]) parameters);
      } catch (Exception ex) {
          throw new DaoException(ex);
      }
  }
  </code></pre>
  
  <p>doesn't work for enums properties. </p>
  
  <p>I have this error:</p>
  
  <blockquote>
    <p>Caused by: org.h2.jdbc.JdbcSQLException: Value too long for column
    "STATUS CHARACTER VARYING(20) NOT NULL":
    "'aced00057e7200466f72672e67656e792e7064702e6669726562697264732e67656e79746f74652e646f6d61696e6d6f64656c2e6265742e4265744465636f6...
    (258)"; SQL statement: UPDATE ... SET ..., status = ? WHERE id = ? [22001-187]    at
    org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
      at org.h2.message.DbException.get(DbException.java:179)     at
    org.h2.table.Column.validateConvertUpdateSequence(Column.java:327)    at
    org.h2.table.Table.validateConvertUpdateSequence(Table.java:737)  at
    org.h2.command.dml.Update.update(Update.java:125)     at
    org.h2.command.CommandContainer.update(CommandContainer.java:78)  at
    org.h2.command.Command.executeUpdate(Command.java:254)    at
    org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:157)
      at
    org.h2.jdbc.JdbcPreparedStatement.executeBatch(JdbcPreparedStatement.java:1183)
      at
    org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(JdbcTemplate.java:1005)
      at
    org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(JdbcTemplate.java:989)
      at
    org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:644)
      ... 43 more </p>
  </blockquote>
  
  <p>MyPojo has an enum value (status). It's strange because the enum string I want to store is 'validated' not 'aced000...'. If I was using JPA, I would used <code>@Enumerated(EnumType.STRING)</code> for my status field but does a stuff like this exists on spring-jdbc ?</p>
  
  <p>Regards</p>