01 Dec 2010, 04:41
Generic-user-small

Luke Burns (3 posts)

Decimal precision and scale are not working:
45.50 becomes 45.5
50.358329384 will stay 50.358329384

Why?

Following the book, the decimal precision and scale that is added in a migration (p82) doesn’t work. When creating or updating entries, decimals aren’t following their precision or scale.

It may not be a problem with the book, but it would be nice to clear this up as we’re following along.

Does anyone know why this is happening?

Luke

30 Nov 2010, 14:26
Generic-user-small

Doug Deets (1 post)

I have encountered the same issue.

09 May 2011, 23:41
Generic-user-small

Megan McVey (2 posts)

SQLITE3 doesn’t appear to actually support precision and scale in decimal values.

At the very least, the adapter is silently dropping them.

09 May 2011, 23:53
Generic-user-small

Megan McVey (2 posts)

Here’s a page on sqlite3’s data type mangling.

http://www.sqlite.org/datatype3.html

  You must be logged in to comment