title: Why cant JPA/hibernate map to MySQL blob type?
body: <p>I got the following error </p>
  
  <pre><code>Caused by: org.hibernate.HibernateException: Wrong column type in TestTable for column PAYLOAD. Found: blob, expected: tinyblob
      at org.hibernate.mapping.Table.validateColumns(Table.java:284)
      at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1174)
      at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:139)
      at org.hibernate.impl.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:387)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1385)
      at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:954)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:883)
      ... 60 more
  </code></pre>
  
  <p>The column hibernate is complaining about is declared as </p>
  
  <pre><code>private byte[]  messagePayload;
  
  @Column(name="PAYLOAD")
  public byte[] getMessagePayload() {
          return messagePayload;
  }
  
  public void setMessagePayload(byte[] messagePayload) {
   this.messagePayload = messagePayload;
  }
  </code></pre>
  
  <p>The table in the MySQL table is declared as a BLOB type. Why doesnt Hibernate want to map to it and why does it insist that i use TINYBLOB? </p>
  
  <p>Thanks</p>