What's the safe way to round?
What's the safe way to round?
- Subject: What's the safe way to round?
- From: Joe Moreno <email@hidden>
- Date: Sun, 01 Mar 2009 13:36:24 -0800
Hi all,
I have set my database Scale on all floats to 7. Sometimes, due to match or rounding, the scale goes beyond that and I get the following exception: [2009-03-01 13:26:28 PST] <WorkerThread3> <com.webobjects.Test>: Exception in performActionNamed() on the action "testIt" with the message : com.webobjects.eoaccess.EOGeneralAdaptorException: The attribute totalCost has a scale of 7, but the value 0.00728571 has a scale of 8: Rounding necessary [2009-03-01 13:26:27 PST] <WorkerThread3> com.webobjects.eoaccess.EOGeneralAdaptorException: The attribute totalCost has a scale of 7, but the value 0.00728571
Is there a simple way to have a number automatically rounded in the EOModel to "fit" into database?
Thanks, Joe
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden