title: Spring Boot with JPA - wrong column type encountered in column
body: <p>I'm using Spring Boot Starter Data Jpa (2.1.9.RELEASE) and I'm trying to map this table:</p>
  
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE `foo` (
    `id` int(11) NOT NULL,
    `woo` tinyint(4) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1
  </code></pre>
  
  <p>The Entity is mapped as follows:</p>
  
  <pre class="lang-java prettyprint-override"><code>@Entity
  @Table(name = "foo")
  public class Foo {
  
      @Id
      @Column(name = "id")
      private Integer id;
  
      @Column(name = "woo")
      private Integer woo;
  
      public Integer getId() {
          return id;
      }
  
      public Integer getWoo() {
          return woo;
      }
  
  }
  </code></pre>
  
  <p>When I start the application I get the following error:</p>
  
  <pre><code>Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [woo] in table [foo]; found [tinyint (Types#TINYINT)], but expecting [integer (Types#INTEGER)]
  </code></pre>
  
  <p>My properties are:</p>
  
  <pre><code>spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
  spring.datasource.url=jdbc:mysql:///test
  spring.datasource.username=root
  spring.datasource.password=root
  spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect
  spring.jpa.hibernate.ddl-auto=validate
  </code></pre>
  
  <p>I tried to do the same mapping using vanilla Jpa and Hibernate (not managed by Spring) and it works fine.</p>
  
  <p>Can anyone point me in the right direction?</p>
  
  <p><a href="https://www.dropbox.com/s/yphzq8x76p0etva/spring-test.zip?dl=0" rel="nofollow noreferrer">Here's a link to the maven project</a>, in case anyone want to try it directly.</p>