MoroGasper / gii-template-collection

Automatically exported from code.google.com/p/gii-template-collection
0 stars 0 forks source link

Bug in admin action: wrong filter #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In the admin action view, in the advanced search,
when the model have boolean fields, a dropdown gets rendered
in each boolean field header.
It has the values empty/true(yes)/false(no), and they are mapped
to 1=yes, 0=no.

Since mysql treats boolean fields as tinyint(1), records with
other values can't be filtered.

Mysql doc says:
BOOL, BOOLEAN - These types are synonyms for TINYINT(1). A value of zero is 
considered false. Nonzero values are considered true.
http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html

Original issue reported on code.google.com by rodrigo.coelho@gmail.com on 6 Oct 2010 at 11:26

GoogleCodeExporter commented 8 years ago
I still haven't come to any way of solving this.
The good news is this is not so wrong, may be just
a biz rule while mysql doesn't support native boolean
fields yet.

Original comment by rodrigo.coelho@gmail.com on 7 Oct 2010 at 5:21

GoogleCodeExporter commented 8 years ago

Original comment by rodrigo.coelho@gmail.com on 7 Oct 2010 at 5:21