title: How do I specify integers to be of a certain length via a JPA annotation
body: <pre><code>create table foo (id INT(10) not null ...)
  </code></pre>
  
  <p>Instead of declaring id as "INTEGER", I would like to specify a length restriction as mentioned above.</p>
  
  <p>I use </p>
  
  <p>@Entity
  class Foo {</p>
  
  <pre><code>@Id
  @GeneratedValue(strategy = IDENTITY)
  @Column(name = "id", unique = true, nullable = false, insertable = false, updatable = false)
  private Integer id;
  </code></pre>
  
  <p>...
  }</p>
  
  <p>How should I specify the length restriction in my JPA model class, so that hbm2ddl automatically generates the schema as per my requirement.</p>