symfony/symfony — Issue #2802: [Form] "empty_value" and "required => false" won't render an empty value for document Field Type
Author: drmonty
Created: 2011-12-08 07:28:30+00:00
State: open

```php
$builder->add('name', 'document', array('class' => 'test\TestBundle\Document\Name', 'multiple' => true, 'empty_value' => true, 'required' => false, 'label' => 'Name:', 'query_builder' => function(DocumentRepository $dm) { return $dm->createQueryBuilder()->sort('name', 'asc');},));
```

Will render all documents, that got fetched by query_builder, but not an empty value in select-form-field.
Only setting 'required' => false or 'empty_value' => true results to the same issue.

Tested with 2.0.6 and 2.1.0-dev (from today).