public function flush()
    {
        $em = $this->entityManager;
        $em->flush();
        $em->clear();

        $this->referenceRepository = null;

        $cacheDriver = $em->getMetadataFactory()->getCacheDriver();

        if ($cacheDriver) {
            $cacheDriver->deleteAll();
        }
    }
public function flush()
    {
        $em = $this->entityManager;
        $em->flush();
        $em->clear();

        $this->referenceRepository = null;

        $cacheDriver = $em->getMetadataFactory()->getCacheDriver();

        if ($cacheDriver) {
            $cacheDriver->deleteAll();
        }
    }
public function flush ( ) { $ em = $ this -> entityManager ; $ em -> flush ( ) ; $ em -> clear ( ) ; $ this -> referenceRepository = null ; $ cacheDriver = $ em -> getMetadataFactory ( ) -> getCacheDriver ( ) ; if ( $ cacheDriver ) { $ cacheDriver -> deleteAll ( ) ; } }
Flush entity manager
Flush entity manager