I have defined a boolean property in my Entity:
/**
* @var boolean
* @Assert\Type(type="bool")
* @ORM\Column(name="is_managed", type="boolean", nullable=true, options={"default": true})
*/
protected $isManaged = true;
When I use it in the sonata admin bundle it just generates an select box with values "1" and "2" - I expected "true" or "false" selection.
$datagridMapper
->add('description')
->add('isManaged', 'doctrine_orm_boolean')
generates the code:
<select id="filter_isManaged_value" name="filter[isManaged][value]" class="form-control select2-offscreen" tabindex="-1" title="Is Managed"><option value=""></option> <option value="label_type_yes">1</option> <option value="label_type_no">2</option></select>
Can somebody help me?