Reputation: 1695
I was generating Entity class using JPA Tools in eclipse Mars. It generates data member of Integer datatype which is smallint type in table.I need to generate short type of datatype for column which is smallint in table.
Upvotes: 0
Views: 8924
Reputation: 2066
After entering JPA entities from table wizard after selecting table->table Association->Customize Defaults->customize indicidual Entities .. here you can customize your table
But usually it ll automatically convert smallint type to short.
Upvotes: 1
Reputation: 2254
I think something like this might work :-
@Column(columnDefinition = "SMALLINT")
@Type(type = "org.hibernate.type.ShortType")
private short variableName;
Upvotes: 4