Whenever I attempt to create a boolean field in InnoDB, it creates a field of type tinyint(1). I'd recommend changing your table schema to use that type, which should be recognised as an integer by PDO.

Whenever I attempt to create a boolean field in InnoDB, it creates a field of type tinyint(1). I'd recommend changing your table schema to use that type, which should be recognised as an integer by PDO.

I have tried tinyint(1),but nothing change.Actually,when I use bool in mysql,it creates a field of type tinyint(1) too. They are the same thing to mysql.

Whenever I attempt to create a boolean field in InnoDB, it creates a field of type tinyint(1). I'd recommend changing your table schema to use that type, which should be recognised as an integer by PDO.

Sorry!I misunderstood your meaning.After some researches,I knew this is a php 'bug'.
Now my question become:how to detect a field is tinyint(1) type in active record?
what is the correct api for something like $fooObject->metadata->columns["isbar"]->fieldtype==="boolean"?