I’m currently working on a Play Framework server-side application that handles money/currency. (The application UI uses Sencha ExtJS, but that doesn’t matter for this example.)
From past experience I know that this means I need to use a decimal
field in my MySQL database table. (MySQL also lets you declare this field type as numeric
.) I further know that the MySQL JDBC driver uses a java.math.BigDecimal field to insert and select from this field type.