I've a Mysql DB and thera are tables with tinyint(1) fields (mysql uses this to store boolean values).
When I do CRUD command for these tables, the view and model recognise the field like "numerical" and not boolean. How can i do yiic recognise this field as boolean.
The code generated by crud is meant to be a good start for you. It still requires your change to fix things like you said. The type tinyint(1) is NOT recognized as a boolean as you know it allows more values than boolean.
Guys, scaffolding is not the problem. BOOL and BOOLEAN are synonyms for TINYINT. It would make sense in MysqlColumnSchema to map tinyint to boolean rather than integer. When I create a column as "boolean" in the DDL, it shows as tinyint(1) in Mysql.
Also it would be nice not to have to hack around Yii with stuff like this:
if (isset($model->tableSchema))
if ($model->tableSchema->columns[$attribute]->dbType == 'text')
$method = 'textarea';
elseif ($model->tableSchema->columns[$attribute]->dbType == 'tinyint(1)')
$method = 'checkbox';
else