title: Symfony2 get new value after UPDATE query
body: <p>in my Symfony2.8 app I got the following controller:</p>
  
  <pre><code>public function changetariffAction(Request $request)
  {
      $em = $this-&gt;getDoctrine()-&gt;getManager();
      $user = $this-&gt;container-&gt;get('security.context')-&gt;getToken()-&gt;getUser();
      $userid = $user-&gt;getId();
      $tariff = $user-&gt;getTariff();//tariff1 here
  
      $paymentForm = $this-&gt;createPaymentForm($user);
      $paymentForm-&gt;handleRequest($request);
  
      if($tariff != 'tariff2') {
  
          $query = $em-&gt;createQuery('UPDATE My\UserBundle\Entity\User u SET u.tariff = :tariff2 WHERE u.id = :userid');
          $query-&gt;setParameter('userid', $user-&gt;getId());
          $query-&gt;setParameter('tariff2', 'tariff2');
          $query = $query-&gt;getResult();//returns 1 here, tariff field in DB is set to tariff2 as expected
  
          $query = $em-&gt;createQuery('SELECT u FROM My\UserBundle\Entity\User u WHERE u.id = :userid');//getting once again user entity but it did not change
          $query-&gt;setParameter('userid', $user-&gt;getId());
          $user = $query-&gt;getResult();
  
          $tariff_upd = $user[0]-&gt;getTariff();//tariff1 here but I need tariff2! 
  //Also I tried to persist and flush user entity here but it did not work
          return $this-&gt;render('MyBundle:Pages:tariffchangesuccess.html.twig', array(
          'user' =&gt; $user,
          'form' =&gt; $paymentForm-&gt;createView(),
          'tariff' =&gt; $tariff_upd //still tariff1 but I need tariff2 
      ));
  
      }
      return $this-&gt;render('MyBundle:Pages:tariffchangesuccess.html.twig', array(
          'user' =&gt; $user,
          'form' =&gt; $paymentForm-&gt;createView(),
          'tariff' =&gt; $tariff
          ));
  
  }
  </code></pre>
  
  <p>My Controller works ok and all the values are updated in my DB as expected but new values (tariff2) are not rendered in my twig template. New values are rendered only when I update the page in my browser (hit F5), but this is not an expected behavior. Any ideas how to fix that? Thank you.  </p>