冲洗功能在特定功能中不起作用。这是它无法正常工作的功能:
/**
* @Route("/mob/user/ma")
*/
public function setMaAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
$user = $em->getRepository('AppBundle:User')->find(1);
$date = $trainer->getDate();
$date->modify('+30 day');
$user->setDate($date);
//dump($user->getDate()); ===> return date 30 days after today! correct...
$em->persist($user);
$em->flush();
return new Response("A");
}