title: Symfony form type inheritance problems
body: <p>I am building an API using the FOSRestBundle and performing validation using the Types provided by Symfony.</p>
  
  <p>The problem I am facing is that I am trying to find a way to flatten the form type inheritance model that was created when trying to prevent code duplication with inheritance within the form types. This was achieved using the guide on <a href="http://symfony.com/doc/current/cookbook/form/inherit_data_option.html" rel="nofollow">inherit data option</a>.</p>
  
  <p>e.g.</p>
  
  <pre><code>....
  
  $builder-&gt;add('nested', new NestedType());
  
  ....
  </code></pre>
  
  <p>However this has an implication when trying to submit data to the API.</p>
  
  <p><strong>Currently:</strong></p>
  
  <pre><code>{
      "type": {
          "key": "value",
          "nested": {
              "nested_key": "value"
          }
      }
  }
  </code></pre>
  
  <p><strong>What I am after:</strong></p>
  
  <pre><code>{
      "type": {
          "key": "value",
          "nested_key": "value"
      }
  }
  </code></pre>
  
  <p>Is there a way to achieve this without duplicating the code within the <code>NestedType</code>?</p>