title: ERROR in Delete symfony 2
body: <p>i have an error in delete method here is the error</p>
  
  <p>EntityManager#remove() expects parameter 1 to be an entity object, NULL given.</p>
  
  <p>here is the code :</p>
  
  <p>public function supprimerAction($id){</p>
  
  <pre><code>$em = $this-&gt;get('doctrine')-&gt;getEntityManager();
  $Livre=$em-&gt;getRepository('EspritBibBundle:Livre')-&gt;find($id);
  $em-&gt;remove($Livre);
  $em-&gt;flush();
  
  
  return $this-&gt;render('EspritBibBundle:Livre:succes.html.twig',array('msg'=&gt;'Suppression effectué avec succés'));
  </code></pre>
  
  <p>}</p>