-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Hey Folks,
for an application we are using hibernate as ORM MApper and jadira for the conversion into java types.
We are converting from a mysql column decimal(19,2) into Yoda Money.
Our billing application now needs to support YEN. To all the currencies so far there is one crucial difference:
YEN does not have decimal places. Still it makes sense to store all the amounts into the same columns.
When you look at the code of yoda money, you see that yoda money will throw an exception if a big decimal with decimal points is provided.
The jadira converter (PersistentMoneyAmountAndCurrency) looks like this:
Now mysql will store for instance the amount '0' as '0.00' in the database. When converting to bigdecimal this value now has a scale. I think it is fixable by changing the code in the method "fromConvertedColumns".
For now I will just duplicate this class and make these changes myself.

