Permalink
Browse files

use doctrine collection-to-array transformer only on forms with multi…

…ple on.
  • Loading branch information...
1 parent ecd29e4 commit 907e941588b807ef5e99c314b9c1f8a81b08806f @pjedrzejewski pjedrzejewski committed Mar 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Form/Type/CategoryChoiceType.php
@@ -63,7 +63,7 @@ public function buildForm(FormBuilder $builder, array $options)
$this->categoryChoiceList->initializeCatalog($this->catalogRegistry->getCatalog($options['catalog']));
- if (in_array($this->driver, array('doctrine/orm', 'doctrine/mongodb-odm', 'doctrine/couchdb-odm'))) {
+ if ($options['multiple'] && in_array($this->driver, array('doctrine/orm', 'doctrine/mongodb-odm', 'doctrine/couchdb-odm'))) {
$builder->prependClientTransformer(new CollectionToArrayTransformer());
}
}

0 comments on commit 907e941

Please sign in to comment.