title: hibernate schema validation wrong column but using normal int
body: <p>Working with hibernate I'm stuck on a schema validation issue. The error is pretty straightforward, it says the expected column type and actual found ones in my code don't match.</p>
  
  <p>Except that as far as I can see they do match. I've added columnDefinition="int(10)"  after looking at similar questions, but this doesn't help. Any help or pointers what to look at further would be much appreciated.</p>
  
  <p><strong>Class  definition and variable declaration</strong></p>
  
  <p>Traject class</p>
  
  <pre><code>public class Traject implements Serializable {
  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name="id", columnDefinition="int(10)")
  private int id;
  
  @OneToMany (fetch = FetchType.EAGER, mappedBy = "traject")
  @Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = "toets_bij_traject")
  @JsonBackReference
  @OrderBy("toetsInSerie ASC")
  private Set&lt;ToetsBijTraject&gt; toetsenBijTraject;
  
  other vars and methods not shown
  </code></pre>
  
  <p>ToetsBijTraject class</p>
  
  <pre><code>@Entity
  @Table(name = "tt_traject_ref_toets")
  @Cache(usage=CacheConcurrencyStrategy.READ_WRITE, region="")
  public class ToetsBijTraject implements Serializable, Comparable&lt;ToetsBijTraject&gt; {
  
  @Id
  @Column(name = "traject_id")
  private Traject traject;
  
  @Id
  @Column(name = "toets_id")
  private Toets toets;
  
  other vars and methods not shown
  </code></pre>
  
  <p><strong>Table traject</strong></p>
  
  <pre><code>CREATE TABLE `traject` (
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `naam` varchar(20) NOT NULL,
    `is_actief` tinyint(1) DEFAULT '1',
    PRIMARY KEY (`id`),
    UNIQUE KEY `naam` (`naam`)
  ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
  
  CREATE TABLE `tt_traject_ref_toets` (
  `traject_id` int(10) unsigned NOT NULL,
  `toets_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`traject_id`,`toets_id`),
  KEY `toets_id` (`toets_id`),
  CONSTRAINT `tt_traject_ref_toets_ibfk_1` FOREIGN KEY (`traject_id`)REFERENCES `traject` (`id`),
  CONSTRAINT `tt_traject_ref_toets_ibfk_2` FOREIGN KEY (`toets_id`) 
  REFERENCES `ref_toets` (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  </code></pre>
  
  <p><strong>Error message:</strong></p>
  
  <pre><code>Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [traject_id] in table [tt_traject_ref_toets]; found [int (Types#INTEGER)], but expecting [tinyblob (Types#VARBINARY)]
  at org.hibernate.tool.schema.internal.SchemaValidatorImpl.validateColumnType(SchemaValidatorImpl.java:105)
  at org.hibernate.tool.schema.internal.SchemaValidatorImpl.validateTable(SchemaValidatorImpl.java:92)
  at org.hibernate.tool.schema.internal.SchemaValidatorImpl.doValidation(SchemaValidatorImpl.java:50)
  at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:91)
  at org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:484)
  at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444)
  at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:802)
  ... 87 more
  </code></pre>