-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
After updating Symfony from 2.6.4 to 2.6.5 handling (MongoDB) document
as Field is broken.
Example FormType:
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->add('terminal', 'document', array('label' => 'terminal', 'required' => false, 'class' => 'company\ExampleBundle\Document\Terminal'));
}
Submitted Form is not valid, Profiler told me:
Symfony\Component\Validator\ConstraintViolation
Object(Symfony\Component\Form\Form).children[terminal] = 546e4a2d46139fca3b413051
Caused by:
Symfony\Component\Form\Exception\TransformationFailedException
Unable to reverse value for property path "terminal": The choice "546e4a2d46139fca3b413051" does not exist or is not unique
Caused by:
Symfony\Component\Form\Exception\TransformationFailedException
The choice "546e4a2d46139fca3b413051" does not exist or is not unique
But document 546e4a2d46139fca3b413051
exists and is unique. Reverting symfony back to 2.6.4 does not lead to this issue and submitted form is valid.
Metadata
Metadata
Assignees
Labels
No labels