I am using the Play Framework with Ebean and H2 database.
The problem is, the BigDecimal
results in the DB script as:
sum decimal(38),
but what I want is:
sum decimal(38,2),
I already tried to define the value in the model like that:
@Digits(integer=6, fraction=2)
private BigDecimal sum;
Any ideas?
You should use @Column(precision = 38, scale = 2) annotation. @Digits annotation seems to be for validation purposes, not for DDL generation.
Also 38 looks like overkill. Are you gonna store all money on earth? :)
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