This works for simple cases like FastMoney.of(100, "EUR") very well but fails if we add decimal values.
E.g. FastMoney.of(100.23, "EUR") will be present in a MyEntity object but after persisting the value 100 EUR will be present in the corresponding table.
I am persisting a FastMoney instance with jadira the following way:
This works for simple cases like
FastMoney.of(100, "EUR")
very well but fails if we add decimal values. E.g.FastMoney.of(100.23, "EUR")
will be present in a MyEntity object but after persisting the value 100 EUR will be present in the corresponding table.I found the following workaround:
If I use
PersistentFastMoneyMinorAmountAndCurrency
it works as expected and 100,23 will be correctly inserted into the DB. Is that intended behavior?Thanks!