• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
What's the safe way to round?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: What's the safe way to round?
      • From: David Avendasora <email@hidden>
    • Re: What's the safe way to round?
      • From: Ramsey Lee Gurley <email@hidden>
  • Prev by Date: AjaxModalDialog in a Repetition
  • Next by Date: Re: oops, EditingContext disposed?
  • Previous by thread: Re: [SOLVED] AjaxModalDialog in a Repetition [
  • Next by thread: Re: What's the safe way to round?
  • Index(es):
    • Date
    • Thread