EOF sets the scale when the values are fetched.
case FB_Decimal: {
if (obj instanceof BigDecimal) {
return ((BigDecimal) obj).setScale(eoattribute.scale(),
BigDecimal.ROUND_HALF_UP).toString();
}
Sorry, this is actually the inverse operation (when you insert) ...
The fetch variant:
case 'B':
BigDecimal bigdecimal = _rs.getBigDecimal(_column);
return _setScaleUpForAttribute(bigdecimal, _attribute);
private static BigDecimal _setScaleUpForAttribute(BigDecimal
bigdecimal, EOAttribute eoattribute) {
int i = eoattribute.scale();
if(bigdecimal != null && bigdecimal.scale() < i) {
bigdecimal = bigdecimal.setScale(i);
}
return bigdecimal;
}
ms _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]