I would like to generate a column (abc NUMBER(2)
) (at the moment) in oracle:
@Column(length = 2)
private Integer abc;
but still in Oracle, the column created is abc NUMBER(10, 0)
.
I tried @Digits(integer=2, fraction=0)
but I think this would not work as the Java type is Integer
.
Java doc for @Digit says:
The annotated element must be a number within accepted range Supported types are:
BigDecimal BigInteger String byte, short, int, long, and their respective wrapper types
null elements are considered valid
but @Digits(integer=2, fraction=0)
has no effect on the generated column.
I am looking for a generic solution which could also work on MySQL also.