ciao a tutti con sql avrei fatto
mysql_insert_id();


ma con docrine?


Codice PHP:
$em $this->getDoctrine()->getEntityManager();
            
$em->persist($utente);
            
$em->flush();