title: Expected argument of type "string", MyEntity given
body: <p>I faced a problem when created a dropdown (category, subcategory) instead of input text fields in FormBuilderInterface
  When I change it back to text input all working good.</p>
  
  <p>Here is my code for FormType</p>
  
  <pre><code>namespace Expatservice\ManagerBundle\Form;
  
  use Symfony\Component\Form\AbstractType;
  use Symfony\Component\Form\FormBuilderInterface;
  use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
  use Symfony\Component\Form\Extension\Core\Type\FileType;
  use Symfony\Bridge\Doctrine\Form\Type\EntityType;
  use Symfony\Component\OptionsResolver\OptionsResolverInterface;
  use Doctrine\ORM\EntityRepository;
  
  class ServiceType extends AbstractType
  {
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
          $builder
              -&gt;add('title')
              -&gt;add('category', EntityType::class, array(
                  'class' =&gt; 'ExpatserviceCategoryBundle:Category',
                  'query_builder' =&gt; function (EntityRepository $er) {
                      return $er-&gt;createQueryBuilder('c')
                      -&gt;where('c.parent = 0')
                      -&gt;orderBy('c.title', 'ASC');
                  },
                  'choice_value' =&gt; 'title',
                  'choice_label' =&gt; 'title'
              ))
              -&gt;add('subcategory', EntityType::class, array(
                  'class' =&gt; 'ExpatserviceCategoryBundle:Category',
                  'query_builder' =&gt; function (EntityRepository $er) {
                      return $er-&gt;createQueryBuilder('c')
                      -&gt;where('c.parent = 2')
                      -&gt;orderBy('c.title', 'ASC');
                  },
                  'choice_value' =&gt; 'title',
                  'choice_label' =&gt; 'title'
              ))
              -&gt;add('description')
              -&gt;add('image', FileType::class, array('data_class' =&gt; null, 'required'=&gt;false));
      }
  
      public function setDefaultOptions(OptionsResolverInterface $resolver)
      {
          $resolver-&gt;setDefaultOptions(array('data_class' =&gt; 'Expatservice\ManagerBundle\Entity\Service'));
      }
  
      public function getName()
      {
          return 'expantservice_managerbundle_service';
      }
  }
  </code></pre>
  
  <p>I understand the problem, but can't figure out how to fix it and don't found nothing in internet.</p>