I have table in PostgreSQL which contains column with type numeric(20)
.
I have mapped this column on field of type Long
.
While validation part hibernate gives me an exception, saying: Found: numeric, expected: int8
. I can not change type of column in the database, how to solve it?
Just add columnDefinition
into the column annotation:
@Column(name = "id", columnDefinition = "NUMERIC", length = 20)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With