title: MissingOptionsException: The required option "class" is missing
body: <p>I am getting the above error when trying to use a entity field type in a form.</p>
  
  <p>I am using Symfony 2.6.0.</p>
  
  <p>My class has a category field defined as:</p>
  
  <pre><code>/**
       * @ORM\ManyToOne(targetEntity="Category", inversedBy="parent")
       * @ORM\JoinColumn(name="category_id", referencedColumnName="id")
       */
      protected $category;
  </code></pre>
  
  <p>The category class is defined as:</p>
  
  <pre><code>/**
   * @ORM\OneToMany(targetEntity="Parent", mappedBy="category")
   */
  protected $parents;
  </code></pre>
  
  <p>My form type has definition for the category as:</p>
  
  <pre><code>-&gt;add('category', 'entity', array(
                  'class' =&gt; 'AppBundle:Category',
                  'property' =&gt; 'name'
  </code></pre>
  
  <p>In my controller I am calling it with:</p>
  
  <pre><code>-&gt;add('category', 'entity') 
  </code></pre>
  
  <p>The stack trace is below:</p>
  
  <pre><code>Symfony\Component\OptionsResolver\Exception\MissingOptionsException: The required option "class" is missing.
  at n/a
      in \project\vendor\symfony\symfony\src\Symfony\Component\OptionsResolver\OptionsResolver.php line 757
  
  at Symfony\Component\OptionsResolver\OptionsResolver-&gt;resolve(array())
      in \project\vendor\symfony\symfony\src\Symfony\Component\Form\ResolvedFormType.php line 109
  
  at Symfony\Component\Form\ResolvedFormType-&gt;createBuilder(object(FormFactory), 'category', array())
      in \project\vendor\symfony\symfony\src\Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy.php line 82
  
  at Symfony\Component\Form\Extension\DataCollector\Proxy\ResolvedTypeDataCollectorProxy-&gt;createBuilder(object(FormFactory), 'category', array())
      in \project\vendor\symfony\symfony\src\Symfony\Component\Form\FormFactory.php line 87
  
  at Symfony\Component\Form\FormFactory-&gt;createNamedBuilder('category', 'entity', null, array())
      in \project\vendor\symfony\symfony\src\Symfony\Component\Form\FormBuilder.php line 106
  
  at Symfony\Component\Form\FormBuilder-&gt;create('category', 'entity', array())
      in \project\vendor\symfony\symfony\src\Symfony\Component\Form\FormBuilder.php line 268
  
  at Symfony\Component\Form\FormBuilder-&gt;resolveChildren()
      in \project\vendor\symfony\symfony\src\Symfony\Component\Form\FormBuilder.php line 216
  
  at Symfony\Component\Form\FormBuilder-&gt;getForm()
      in \project\src\AppBundle\Controller\TheController.php line 78
  
  at AppBundle\Controller\TheController-&gt;editAction('30', object(Request))
      in  line 
  
  at call_user_func_array(array(object(TheController), 'editAction'), array('30', object(Request)))
      in \project\app\bootstrap.php.cache line 3008
  
  at Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw(object(Request), '1')
      in \project\app\bootstrap.php.cache line 2970
  
  at Symfony\Component\HttpKernel\HttpKernel-&gt;handle(object(Request), '1', true)
      in \project\app\bootstrap.php.cache line 3119
  
  at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel-&gt;handle(object(Request), '1', true)
      in \project\app\bootstrap.php.cache line 2364
  
  at Symfony\Component\HttpKernel\Kernel-&gt;handle(object(Request))
      in \project\web\app_dev.php line 28
  </code></pre>
  
  <p>Any help would be very much appreciated.</p>
  
  <p>Jay</p>