我在 eclipse Mars 中使用 JPA Tools 生成实体类。它生成Integer数据类型的数据成员,在表中为smallint类型。我需要为列生成short类型的数据类型表中的smallint。
最佳答案
我认为这样的事情可能会起作用:-
@Column(columnDefinition = "SMALLINT")
@Type(type = "org.hibernate.type.ShortType")
private short variableName;
关于java - 如何在eclipse中使用JPA工具为smallint类型列生成短变量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31940359/