title: Empty collection field type in a form
body: <p>I've defined a Form that only have one 'collection' type field:</p>
  
  <pre><code>&lt;?php
  namespace GMC\AccesoSistemaBundle\Form;
  
  use Symfony\Component\Form\AbstractType;
  use Symfony\Component\Form\FormBuilderInterface;
  use Symfony\Component\OptionsResolver\OptionsResolverInterface;
  use GMC\AccesoSistemaBundle\Form\FuncionType;
  
  class FuncionesType Extends AbstractType
  {
      public function buildForm(FormBuilderInterface $builder, array $options) {
  
          $builder
                  -&gt;add('funciones', 'collection', array(
                      'type' =&gt; new FuncionType(),
                      'allow_add' =&gt; true,
                      'allow_delete' =&gt; true,
                      'by_reference' =&gt; false));
      }
  
      public function setDefaultOptions(OptionsResolverInterface $resolver) {
  
          $resolver-&gt;setDefaults(array(
              'data_class' =&gt; null
          ));
      }
  
      public function getName() {
  
          return 'gmc_accesosistemabundle_funcionestype';
      }
  </code></pre>
  
  <p>Then I create a form in my controller:</p>
  
  <pre><code>public function mostrarFuncionesAction() {
      $em = $this-&gt;getDoctrine()-&gt;getManager();
      $funciones = $em-&gt;getRepository('AccesoSistemaBundle:Funcion')-&gt;findAll();
      $formulario = $this-&gt;createForm(new FuncionesType(), $funciones);
      return $this-&gt;render(
              'AccesoSistemaBundle:Default:funciones.html.twig',
              array('formulario' =&gt; $formulario-&gt;createView())
              );
  }
  </code></pre>
  
  <p>But even when $funciones has two records, the 'funciones' collection of the form is empty, why? Am I missing anything?</p>
  
  <p>As you can see I'm a complete newbbie with Symfony2 so please be patient with me.</p>
  
  <p>Thanks in advance for your help!</p>