title: Symfony 2 Form inheritance
body: <p>I've got an issue with form inheritance using symfony2 and doctrine2.
  Here's is the thing :</p>
  
  <p>I've got an entity <code>users</code> nothing special just few field with the name, email, etc...</p>
  
  <pre><code>Ferncoder\Devis\UserBundle\Entity\users:
    type: entity
    table: null
    fields:
      id:
        type: integer
        id: true
        unsigned: true
        nullable: false
        generator:
          strategy: AUTO
      name:
        type: string
        length: '45'
        nullable: false
  </code></pre>
  
  <p>I've got an entity <code>craftsMans</code> this table has a relation OneToOne with the <code>users</code> entity.</p>
  
  <pre><code>Ferncoder\Devis\UserBundle\Entity\craftsMan:
    type: entity
    oneToOne:
      user:
        targetEntity: users
        joinColumn:
          name: user_id
          referencedColumnName: id
    table: null
    fields:
      id:
        type: integer
        id: true
        unsigned: true
        nullable: false
        generator:
          strategy: AUTO
  </code></pre>
  
  <p>I've generated 2 form class <code>usersType</code> and <code>craftsmanType</code>. To create my craftsMan I've done my form like this :</p>
  
  <pre><code>class craftsManType extends AbstractType
  {
      public function buildForm(FormBuilder $builder, array $options)
      {
          $builder
              -&gt;add('user', new usersType())
              -&gt;add('company', 'text')
              -&gt;add('fieldOfActivities', 'text')
              -&gt;add('legalForm', 'text')
              -&gt;add('siret', 'text')
              -&gt;add('website', 'text')
              -&gt;add('description', 'textarea')
              -&gt;add('services', 'textarea')
              -&gt;add('employee', 'text')
              -&gt;add('phone', 'text')
          ;
      }
  </code></pre>
  
  <p>My form look cool until I want to get the values of my fields. The problem is that my <code>'user'</code> field is return as an array and not as an entity. DId I missed something? How can I generate my users Object from the field <code>user</code>. I don't feel like creating the object mays setting all the attributs is the best way to do.</p>
  
  <p>Maybe I'm wrong.</p>
  
  <p>Thanks,</p>