i'm trying to do a query that find entity of this year .
i try this but don't work
$em = $this->getDoctrine()->getManager(); $query = $em->createQuery( 'SELECT p FROM AppBundle:Analisi p WHERE p.dataCreazione > :current_year ORDER BY p.dataCreazione ASC' )->setParameter('current_year', date("Y").'01-01'); $analisi = $query->getResult(); it return analisi in database. It don't work but i don't understand why