title: Entity field type with identity through foreign entity
body: <p>I have a <code>Profile</code> entity with simple derived identity taken from a <code>User</code> entity, as explained in <a href="http://doctrine-orm.readthedocs.org/en/latest/tutorials/composite-primary-keys.html#use-case-2-simple-derived-identity" rel="nofollow">Doctrine docs</a>. So the <code>User</code> provides the <code>id</code> and the <code>Profile</code> uses the foreign key as identifier.</p>
  
  <pre><code>User:
    type: entity
    id:
      id:
        type: integer
        generator:
          strategy: AUTO
  
  Profile:
    type: entity
    id:
      user:
        associationKey: true
    oneToOne:
      user:
        targetEntity: User
  </code></pre>
  
  <p>Then I have an entity field within a form, using <code>Profile</code> as class.</p>
  
  <pre><code>-&gt;add('profile', 'entity', array(
      'class' =&gt; 'AppBundle\Entity\Profile'
  ))
  </code></pre>
  
  <p>I expected the resulting element to be, as usual, something like:</p>
  
  <pre><code>&lt;select&gt;
      &lt;option value="[id of the profile]"&gt;[toString of the profile]&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>But instead I get:</p>
  
  <pre><code>&lt;select&gt;
      &lt;option value="[toString of the user]"&gt;[toString of the profile]&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Of course, when submitting the form I get a validation error because it expects an <code>id</code> but gets an string.</p>
  
  <p>How could I force the field to use the profile <code>id</code> as <code>value</code>? Or at least the user <code>id</code> (that is the same).</p>