Mapping BigDecimals with Morphia for MongoDB (technology-ebay.de)
It's generally better to use BigDecimals for storing prices, because floats and doubles do not store exact values. Unfortunately, if you use Morphia as an abstraction layer for MongoDB, BigDecimals are not supported. To overcome this issue, you can convert those BigDecimals to exact data types, such as long values. This article explains how it's done.
0 comments
[ 3.2 ms ] story [ 12.5 ms ] threadNo comments yet.