Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

do_mysql should not automatically coerce tinyint(1) values into bools #69

Open
rtyler opened this issue Jul 8, 2014 · 0 comments
Open

Comments

@rtyler
Copy link

rtyler commented Jul 8, 2014

When executing a select against a MySQL table with tinyint(1) columns both the C extension and the Java extension will coerce a tinyint(1) field into a type of TrueClass

TINYINT can be (unsigned) between 0 and 255, which is agreat many more values than True/False :)

FWIW, this issue was encountered when trying to use DataMapper's "group by" support (e.g. Person.all(:fields => [:job], :unique => true, :order => [:job.asc])) over a dm-types Enum property

@rtyler rtyler changed the title do_mysql should no automatically coerce tinyint(1) values into bools do_mysql should not automatically coerce tinyint(1) values into bools Jul 8, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant