title: Error: Entities passed to the choice field must be managed in a multistep form
body: <p>I have 2 Entities: Campaignstreams &amp; Materialstreams. 
  They are linked to eachother in a ManyToMany relationship.</p>
  
  <p><strong>Campaignstream</strong></p>
  
  <pre><code>class campaignstream
  {
   /**
    * @var integer
    *
    * @ORM\Column(name="id", type="integer")
    * @ORM\Id
    * @ORM\GeneratedValue(strategy="AUTO")
    */
    private $id;
  
   /**
    * @var string
    *
    * @ORM\Column(name="name", type="string", length=80)
    */
    private $name;
  
   /**
    * @ORM\ManyToMany(targetEntity="materialstream", inversedBy="campaignstreams")
    * @ORM\JoinTable(name="campaignstream_materialstream")
    *
    */
    private $materialstreams;
  }
  </code></pre>
  
  <p><strong>Materialstream</strong></p>
  
  <pre><code>class materialstream
  {
   /**
    * @var integer
    *
    * @ORM\Column(name="id", type="integer")
    * @ORM\Id
    * @ORM\GeneratedValue(strategy="AUTO")
    */
    private $id;
  
   /**
    * @var string
    *
    * @ORM\Column(name="description", type="string", length=80)
    */
    private $description;
  
   /**
    * @ORM\ManyToMany(targetEntity="campaignstream", mappedBy="materialstreams")
    *
    */
    private $campaignstreams;
  
  }
  </code></pre>
  
  <p>Now I want to create a multi-step form to create a campaignstream with multiple materialstreams attached to it. </p>
  
  <p>In my controller I've got something like this:</p>
  
  <pre><code>public function addAction(Request $request, $step)
  {
    $session = $request-&gt;getSession();
    $em = $this-&gt;getDoctrine()-&gt;getManager();
  
    if ($step == 1) {
      $campaignstream = ($session-&gt;get('campaignstreamdata') == '') ? new campaignstream() : $session-&gt;get('campaignstreamdata');
      $CSF = $this-&gt;createForm(new CampaignstreamForm(), $campaignstream);
      $CSF-&gt;handleRequest($request);
      if ($CSF-&gt;isSubmitted() &amp;&amp; $CSF-&gt;isValid()) {
        $session-&gt;set('campaignstreamdata', $CSF-&gt;getData());
        return $this-&gt;redirectToRoute('campaignstream_add', array('step' =&gt; 2));
      } else {
        return $this-&gt;render('CampaignBundle:Stream:add.html.php', array(
          'current' =&gt; $id, 
          'data' =&gt; $CSF-&gt;createView()
        ));
      }
    } elseif ($step == 2) {
      $campaignstream = $session-&gt;get('campaignstreamdata');
      $CSMSF = $this-&gt;createForm(new CampaignstreamMaterialstreamForm(), $campaignstream);
      if ($CSMSF-&gt;isSubmitted()) {
        $session-&gt;set('campaignstreamdata', $CSMSF-&gt;getData());
        return $this-&gt;redirectToRoute('campaignstream_add', array('step' =&gt; 3));
      } else {
        return $this-&gt;render('CampaignBundle:Stream:add.html.php', array(
          'progress' =&gt; $progress,
          'current' =&gt; $id,
          'data' =&gt; $CSMSF-&gt;createView(),
          'title' =&gt; $title,
          'campaignstream' =&gt; $campaignstream
        ));
      }
    } elseif ($step == 3) {
       ...
    }
  }
  </code></pre>
  
  <p>Now, in the form that I use for step 2, I have this:</p>
  
  <pre><code>public function buildForm(FormBuilderInterface $builder, array $options)
  {
    $builder
      -&gt;add('materialstreams', 'entity', array(
        'class' =&gt; 'CampaignBundle:materialstream',
        'property' =&gt; 'description',
        'multiple' =&gt; true,
        'expanded' =&gt; false,
      ));
  }
  </code></pre>
  
  <p>Now the problem is:<br>
  I go through step 1 and fill in the name. I go through step 2 and I select the correct materialstreams. I come to step 3 and I realise I forgot 1 materialstream. I click on the link to go back to step 2, to get the error: <strong>Entities passed to the choice field must be managed</strong></p>
  
  <p>I've googled it, and tried various solutions like:</p>
  
  <pre><code>$campaignstream = $em-&gt;merge($campaignstream);
  </code></pre>
  
  <p>The error goes away, but my form is not filled with the previously added data, but the data does exist in the session.</p>
  
  <p>I could really use some help.</p>