symfony/symfony — Issue #2774: manyToMany relation without multiple selection
Author: arnaugm
Created: 2011-12-02 18:35:38+00:00
State: open

I have a manyToMany relation rendered in a view.

By default what is rendered is a select tag with the multiple option, which is natural.
The problem is that in this specific view I don't want that the user can select more than one option. I added the option "multiple=false" in the form builder, but I got the error:

"Expected an object, but got a collection. Did you forget to pass "multiple=true" to an entity field?"

How can I solve this?

Thankyou