title: Symfony form inheritance : Neither the property nor one of the methods exist
body: <p>I have a nested form</p>
  
  <pre><code>demand
      home
         child
         godfather
  </code></pre>
  
  <p><code>demand</code> is a parent and embed <code>home</code> which embed <code>child</code> and <code>father</code> (2 last forms are on the same level)</p>
  
  <p>In <code>DemandeType</code> I have:</p>
  
  <pre><code>           $builder
             -&gt;add('date', 'datetype')
             -&gt;add('name', 'text')
             //...
  
             -&gt;add('home', 'home', array(
              'mapped' =&gt; false,
              'data_class' =&gt; 'AppBundle\Entity\Home',
              'inherit_data' =&gt; true
               ))
  
  public function configureOptions(OptionsResolver $resolver)
  {
      $resolver-&gt;setDefaults(array(
          'data_class' =&gt; 'AppBundle\Entity\Demand',
      ));
  }
  </code></pre>
  
  <p>In <code>HomeType</code> :</p>
  
  <pre><code>           $builder
             -&gt;add('address', 'textarea')
             //...
  
             -&gt;add('child', 'child', array(
              'mapped' =&gt; false,
              'data_class' =&gt; 'AppBundle\Entity\Child',
              'inherit_data' =&gt; true
               ))
  
             -&gt;add('godfather', 'godfather', array(
              'mapped' =&gt; false,
              'data_class' =&gt; 'AppBundle\Entity\Godfather',
              'inherit_data' =&gt; true
               ))
  
  public function configureOptions(OptionsResolver $resolver)
  {
      $resolver-&gt;setDefaults(array(
          'data_class' =&gt; 'AppBundle\Entity\Home',
      ));
  }
  </code></pre>
  
  <p>And in <code>ChildType</code> and <code>GodfatherType</code> I have only text fields for firstname, lastname with their right data_class.</p>
  
  <p>But when I submit the form (DemandType, wichh embed all subforms) I got this error :</p>
  
  <blockquote>
    <p>Neither the property "address" nor one of the methods "getAddress()", "address()", "isAddress()", "hasAddress()", "__get()" exist and have public access in class "AppBundle\Entity\Demand". </p>
  </blockquote>
  
  <p>And these methods don't belong to <code>Demand</code> entity but <code>Home</code> entity. I've put the <code>inherit_data</code>, what I'm missing ?</p>
  
  <p>Thanks</p>