public function contains($entity)
    {
        try{
            return $this->entityManager->contains($entity);
        } catch(ORMException $e) {
            if (!$this->entityManager->isOpen()) {
                $this->resetEntityManager();
            }
            throw $e;
        }
    }
public function contains($entity)
    {
        try{
            return $this->entityManager->contains($entity);
        } catch(ORMException $e) {
            if (!$this->entityManager->isOpen()) {
                $this->resetEntityManager();
            }
            throw $e;
        }
    }
public function contains ( $ entity ) { try { return $ this -> entityManager -> contains ( $ entity ) ; } catch ( ORMException $ e ) { if ( ! $ this -> entityManager -> isOpen ( ) ) { $ this -> resetEntityManager ( ) ; } throw $ e ; } }
Determines whether an entity instance is managed in this EntityManager.

@param object $entity

@return boolean TRUE if this EntityManager currently manages the given entity, FALSE otherwise.
Determines whether an entity instance is managed in this EntityManager .