title: Symfony2 : displaying form entity field type as radio buttons
body: <p>I am trying to display all categories (from my table Category) with radio buttons.
  There are 3 categories but only one radio button is displayed while the Doctrine query is OK.</p>
  
  <p>My FormType code :</p>
  
  <pre><code>public function buildForm(FormBuilder $builder, array $options)
  {
      $builder-&gt;add('categories', 'entity', array(
          'class' =&gt; 'MyBundle:Category',
          'expanded' =&gt; true,
          'property' =&gt; 'title',
          'property_path' =&gt; false,
      ));
  }
  </code></pre>
  
  <p>My Twig code :</p>
  
  <pre><code>{{ form_widget(form) }}
  </code></pre>
  
  <p>The result should return 3 radio buttons, but I see only one radio button (the first in my table).</p>
  
  <p>The Doctrine query displayed in the Symfony profiler (debug bar) is executed perfectly and returns 3 rows.</p>
  
  <p>Maybe the problem comes from the "property_path" that I had to add, otherwise I had an exception :</p>
  
  <pre><code>Neither property "categories" nor method "getCategories()" nor method "isCategories()" exists in class ...
  </code></pre>
  
  <p>Any help please ?</p>
  
  <p>Many thanks :-)</p>
  
  <p>Aurel</p>
  
  <p>EDIT :</p>
  
  <p>Here is my dev.log corresponding to this request, when removing the "property_path" :</p>
  
  <pre><code>[2012-04-26 07:27:01] doctrine.DEBUG: SELECT t0.id AS id1, t0.last_update AS last_update2, t0.title AS title4 FROM category t0 ([]) [] []
  [2012-04-26 07:27:01] event.DEBUG: Notified event "kernel.exception" to listener "Symfony\Component\Security\Http\Firewall\ExceptionListener::onKernelException". [] []
  [2012-04-26 07:27:01] event.DEBUG: Notified event "kernel.exception" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelException". [] []
  [2012-04-26 07:27:01] event.DEBUG: Notified event "kernel.exception" to listener "Symfony\Component\HttpKernel\EventListener\ExceptionListener::onKernelException". [] []
  [2012-04-26 07:27:01] request.CRITICAL: Symfony\Component\Form\Exception\InvalidPropertyException: Neither property "categories" nor method "getCategories()" nor method "isCategories()" exists in class "Acme\MyBundle\Entity\Category" (uncaught exception) at /www/vendor/symfony/src/Symfony/Component/Form/Util/PropertyPath.php line 316 [] []
  </code></pre>
  
  <p>I really don't understand why it refused to display each row of my Category table...</p>