title: java.sql.SQLException: Data truncated for column 'gender' at row 1 for enum
body: <p>I am using annotations to persist the record in MySQL database.</p>
  
  <p>at the database side I am defining column gender as gender ENUM('M','F')</p>
  
  <p>Defining enum as follows :</p>
  
  <pre><code>public enum Gender {
  M,F;
  }
  </code></pre>
  
  <p>In the annotation class I am defining enum property as follows :</p>
  
  <pre><code>@Column(name="gender")
  @Enumerated(EnumType.ORDINAL) 
  private Enum&lt;Gender&gt; gender=Gender.M;
  </code></pre>
  
  <p>I am saving the property in the database as follows :</p>
  
  <pre><code>employee.setGender(Gender.M);
  </code></pre>
  
  <p>But when am running the program am getting following error :</p>
  
  <pre><code>Hibernate: insert into Employees (birth_date, first_name,gender,hire_date,last_nane values
  org.hibernate.exception.GenericJDBCException: Data truncated for column 'gender' at row 1
  at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert         
  at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)
  at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)
  at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation    
  at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke
  at com.sun.proxy.$Proxy11.executeUpdate(Unknown Source)
  at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract   
  at org.hibernate.id.insert.AbstractReturningDelegate.performInsert
  at org.hibernate.persister.entity.AbstractEntityPersister.insert
  at org.hibernate.persister.entity.AbstractEntityPersister.insert  
  at org.hibernate.action.internal.EntityIdentityInsertAction.execute
  at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
  at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:203)
  at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:183)
  at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:167)
  
  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)
  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)
  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
  at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
  at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
  at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Unknown Source)
  at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation
  ... 25 more
  </code></pre>
  
  <p>I tried with both String as well as ordinal but error remain as it is.</p>
  
  <p>Ordinal means int.Do I need to change schema definition of gender type from enum to String or int.
  Do hibernate annotation do not work with column type enum?
  Please help me regarding the issue.</p>