public function fetchOne(array $parameters = [], $hydrationMode = null)
    {
        $this->appendParameters($parameters);
        $this->limit(1, 0);

        return $this->getQuery()->getOneOrNullResult($hydrationMode);
    }
public function fetchOne(array $parameters = [], $hydrationMode = null)
    {
        $this->appendParameters($parameters);
        $this->limit(1, 0);

        return $this->getQuery()->getOneOrNullResult($hydrationMode);
    }
public function fetchOne ( array $ parameters = [ ] , $ hydrationMode = null ) { $ this -> appendParameters ( $ parameters ) ; $ this -> limit ( 1 , 0 ) ; return $ this -> getQuery ( ) -> getOneOrNullResult ( $ hydrationMode ) ; }
Fetch first entity.

@param array $parameters
@param int   $hydrationMode

@return mixed|null
@throws \Doctrine\ORM\NonUniqueResultException
@throws \Xloit\Bridge\Doctrine\ORM\Exception\InvalidArgumentException
Fetch first entity .