create table foo (id INT(10) not null ...)
我不想将 id 声明为“INTEGER”,而是指定如上所述的长度限制。
我用
@Entity 类 Foo {
@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "id", unique = true, nullable = false, insertable = false, updatable = false)
private Integer id;
... }
我应该如何在我的 JPA 模型类中指定长度限制,以便 hbm2ddl 根据我的要求自动生成模式。