public function persistEntities()
    {
        foreach ($this->entityManager->getUnitOfWork()->getIdentityMap() as $className => $entities) {
            if ($className === $this->entityClassName) {
                $this->entityManager->flush($entities);
                return;
            }
        }
    }
public function persistEntities()
    {
        foreach ($this->entityManager->getUnitOfWork()->getIdentityMap() as $className => $entities) {
            if ($className === $this->entityClassName) {
                $this->entityManager->flush($entities);
                return;
            }
        }
    }
public function persistEntities ( ) { foreach ( $ this -> entityManager -> getUnitOfWork ( ) -> getIdentityMap ( ) as $ className => $ entities ) { if ( $ className === $ this -> entityClassName ) { $ this -> entityManager -> flush ( $ entities ) ; return ; } } }
Persists all entities managed by the repository and all cascading dependencies

@return void
Persists all entities managed by the repository and all cascading dependencies