marcoarment / FCModel

An alternative to Core Data for people who like having direct SQL access.
MIT License
1.65k stars 173 forks source link

fix precision issue insert NSDecimalNumber #16

Closed allenwei closed 11 years ago

allenwei commented 11 years ago

if insert NSDecimalNumber directly into sqlite, it will have precision issue. NSDecimalNumber 3.33 will become 3.2999999999

so convert NSDecimalNumber it into NSString before insert will solve this problem

allenwei commented 11 years ago

This is the question I asked on StackOverflow

http://stackoverflow.com/questions/19861794/rounding-issus-insert-nsdecimalnumber-into-sqlite

allenwei commented 11 years ago

thanks @marcoarment