Symfony (Admin Generator) with Doctrine using Checkboxes Pitfall
In working with Symfony’s Admin Generator I was having one hell of a time trying to get a boolean column (tinyint(1)) to show up on the form as a checkbox. At first I was trying to over-ride the behavior in the lib/form/doctrine/<object>Form.class.php file, which worked on render but failed on submit.
After asking in #symfony on irc.freenode.net I was informed I needed to change the data type in config/doctrine/schema.yml file from the exact mapping via the mysql data type. Check it out:
vi config/doctrine/schema.yml
Before
Object:
tableName: someName
columns:
some_boolean_column:
type: integer(1)
default: '0'
notnull: true
After
Object:
tableName: someName
columns:
some_boolean_column:
type: boolean
After this I ran the following:
php symfony doctrine:build-model
php symfony doctrine:build-filters
php symfony doctrine:build-forms
php symfony cc
After that the form rendered and validated as expected.

Ok, this means we need to use “physically” a boolean data type and not a tinyint?