title: How to use a resolved target entity in a Symfony2 form type?
body: <p>There is <kbd>src/AppBundle/Entity/ShoppingCart/Order.php</kbd> which resolve <kbd>OrderInterface</kbd> and it works fine with Doctrine. </p>
  
  <p>If try use it in form <code>'class' =&gt; OrderInterface::class</code>  then I got an error:</p>
  
  <p><code>Class "ShoppingCartBundle\Entity\OrderInterface" seems not to be a managed Doctrine entity. Did you forget to map it?"</code></p>
  
  <p>Of course it is possible define <code>'class' =&gt; Order::class</code> directly, but in that case loses advantages of resolve target entities configs.</p>
  
  <p><kbd>src/ComplaintsBundle/Form/Type/ComplaintType.php</kbd></p>
  
  <pre><code>...
  public function buildForm(FormBuilderInterface $builder, array $options)
  {
     $builder
          -&gt;add('order', EntityType::class,
              array(
                  'required'    =&gt; true,
                  'class'       =&gt; OrderInterface::class,
                  'property'    =&gt; 'id',
              )
          );
  }
  ...
  </code></pre>
  
  <p><kbd>app/config/config.yml</kbd></p>
  
  <pre><code>orm:
      auto_generate_proxy_classes: %kernel.debug%
      auto_mapping: true
      resolve_target_entities:
          ShoppingCartBundle\Entity\OrderInterface: AppBundle\Entity\ShoppingCart\Order
  </code></pre>