title: delete row from a database table in symfony
body: <p>i want to delete the selected row from an html table that displays the orders list . this is the table code :  </p>
  
  <pre><code> {% for reservation in ListeDesReservations %}
              &lt;tr&gt;
      //columns ... //
                  &lt;td class="text-center text-lg text-medium"&gt;{{ reservation.seat}}&lt;/td&gt;
                  &lt;td class="text-center text-lg text-medium"&gt;{{ reservation.getEvent().getPrix()}}&lt;/td&gt;
                {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
                  {% set url = absolute_url(asset('')) ~ 'app_dev.php/supprimerReservation/' ~ reservation.id  %}
                {% else %}
                  {% set url = "OTHER_URL" %}
                {% endif %}
                  &lt;td class="text-center"&gt;&lt;a  href="{{url}}" &gt;&lt;/a&gt;&lt;/td&gt;
                &lt;/tr&gt;
              {% endfor %}
              &lt;/tbody&gt;
            &lt;/table&gt;
  </code></pre>
  
  <p>this my delete method in the controller   :</p>
  
  <pre><code>    public function SupprimerReservationAction($idReservation){
          $em = $this-&gt;getDoctrine()-&gt;getEntityManager();
          $entite = $em-&gt;getRepository('techeventBundle:reservation')-&gt;find($idReservation);
          $em-&gt;remove($entite);
          $em-&gt;persist($entite);
          $em-&gt;flush();
          //Affichage
          $iduser = $this-&gt;getUser()-&gt;getId();
          return $this-&gt;redirectToRoute('affichage', ['iduser' =&gt; $iduser]);
          //Affichage
      }
  
  </code></pre>
  
  <p>this is my routing file : </p>
  
  <pre><code>affichage:
      path:     /afficherPanier/{iduser}
      defaults: { _controller: reservationBundle:Default:afficherPanier }
  
  supprimerReservation:
      path:     /supprimerReservation/{idReservation}
      defaults: { _controller: reservationBundle:Default:SupprimerReservation }
  </code></pre>
  
  <p>the problem is when i click on the remove link it redirects me to the same link 
  (app_dev.php/afficherPanier/2)  while it's supposed to redirect me to the delete route (app_dev.php/supprimerReservation/27) </p>