src/ResetableEntityManager.php
public function createQuery($dql = '')
    {
        try{
            return $this->entityManager->createQuery($dql);
        } catch(ORMException $e) {
            if (!$this->entityManager->isOpen()) {
                $this->resetEntityManager();
            }
            throw $e;
        }
    }
public function createQuery($dql = '')
    {
        try{
            return $this->entityManager->createQuery($dql);
        } catch(ORMException $e) {
            if (!$this->entityManager->isOpen()) {
                $this->resetEntityManager();
            }
            throw $e;
        }
    }
{@inheritDoc}