msvrtan's blog

Sonata Admin and boolean fields 'hack'

If you are using Sonata Admin Bundle (SonataAdminBundle) and want to support persisted boolean fields you will have to define that property in your Entity as nullable.

* @var boolean
* @ORM\Column(name="myFavoriteBooleanField", type="boolean", nullable=true)
private $myFavoriteBooleanField;

Otherwise Sonata Admin will expect you to have this field checked and will not allow you to set value as 'false'.

Another important detail, in validation do not set this field as NotBlank since it will cause same problems with unavailability of 'false' value to choose.

I'm not sure if this is a but or not :(