I have a simple form for editing users and, amongst other things, assigning them roles.
It works well for authentication when i manually add the right lines to the database, and authentication works flawlessly. However, the following code breaks down: $form->add(new EntityChoiceField('roles',array( "class" => 'MyProject\\UserBundle\\Entity\\Role', "em"=>$this->get('doctrine.orm.entity_manager') ))); $form->bind($this->get('request'), $user); The message i get is: "Entities passed to the choice field must be managed" The class exists, the property is correct, the entity manager works, and if it matters, the user is previously stored in the database. The edit-form works well except for when i add this field. Any idea about what might be wrong? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en