You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
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
The text was updated successfully, but these errors were encountered:
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 freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When executing a
select
against a MySQL table withtinyint(1)
columns both the C extension and the Java extension will coerce atinyint(1)
field into a type ofTrueClass
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 propertyThe text was updated successfully, but these errors were encountered: