symfony2 form choice and mongodb
The Doctrine MongoDB ODM equivalent of EntityType
is Symfony\Bundle\DoctrineMongoDBBundle\Form\Type\DocumentType
. DocumentChoiceList
, DocumentsToArrayTransformer
, and DocumentToIdTransformer
are also included in DoctrineMongoDBBundle and parallel their ORM equivalents.
Change entity
to document
, and you can just use the shortcut. ex: FistCoreBundle:Group
I had to partially stray from Dylan Oliver's answer.
Symfony\Bundle\DoctrineMongoDBBundle\Form\Type\DocumentType
could not be found, as of November 2016 DocumentType seems to reside here:
Doctrine\Bundle\MongoDBBundle\Form\Type\DocumentType