title: Symfony2 Form "collection" + Doctrine Column "array" = Empty form_widget
body: <p>I have a simple question about Symfony2's form type "collection" in combination with doctrine's column "array".**</p>
  
  <p>My Entity:</p>
  
  <pre><code>/**
   * @Column(type="array", nullable=true)
   * @var array
   */
  private $specifications;
  </code></pre>
  
  <p>My "Main" Form:</p>
  
  <pre><code>public function buildForm(FormBuilder $builder, array $options)
  {
      $builder-&gt;add('specifications', 'collection', array (
              'type' =&gt; new ProductSpecificationType(),
              'allow_add' =&gt; true,
              'allow_delete' =&gt; true,
              'by_reference' =&gt; false
          )
      );
  }
  </code></pre>
  
  <p>My "ProductSpecificationsType" Form:</p>
  
  <pre><code>public function buildForm(FormBuilder $builder, array $options)
  {
      $builder
          -&gt;add('group', 'text')
          -&gt;add('info', 'text')
      ;
  }
  </code></pre>
  
  <p>And my output with button (twig):</p>
  
  <pre><code>{{ form_row(form.specifications) }}
  &lt;a data-prototype="{{ form_widget(form.specifications.vars.prototype) | e }}" href="#" onclick="return false;"&gt;Add&lt;/a&gt;
  </code></pre>
  
  <p>The real outout is this (html):</p>
  
  <pre><code>&lt;a data-prototype="" href="#" onclick="return false;"&gt;Add&lt;/a&gt;
  </code></pre>
  
  <p>And the same if I use only the form_widget without the "e" like "escape" at the end.</p>
  
  <p>After save the entity is saved with the array column = null.</p>
  
  <p>So, if I add these lines per FireBug manually to the html form</p>
  
  <pre><code>&lt;input type="text" name="product[specifications][0][group]" value="Exam"&gt;
  &lt;input type="text" name="product[specifications][0][info]" value="ple"&gt;
  &lt;input type="text" name="product[specifications][1][group]" value="Extra"&gt;
  &lt;input type="text" name="product[specifications][1][info]" value="Example"&gt;
  </code></pre>
  
  <p>and press then "Save", the entity is saved in this format:</p>
  
  <pre><code>a:2:{i:0;a:2:{s:5:"group";s:4:"Exam";s:4:"info";s:3:"ple";}i:1;a:2:{s:5:"group";s:5:"Extra";s:4:"info";s:7:"Example";}}
  </code></pre>
  
  <p>My questions:</p>
  
  <ol>
  <li><p>Why is my prototype empty?</p></li>
  <li><p>Why is the form_widget empty? (is also empty if I fill the data above manually!)</p></li>
  </ol>
  
  <p>Thank you in advance!</p>