public function findOneWith(QueryBuilder $query)
    {
        $this->load($query);
        $result = $query->execute()->fetch();
        if ($result) {
            return $this->hydrate($result, $query);
        }

        return false;
    }
public function findOneWith(QueryBuilder $query)
    {
        $this->load($query);
        $result = $query->execute()->fetch();
        if ($result) {
            return $this->hydrate($result, $query);
        }

        return false;
    }
public function findOneWith ( QueryBuilder $ query ) { $ this -> load ( $ query ) ; $ result = $ query -> execute ( ) -> fetch ( ) ; if ( $ result ) { return $ this -> hydrate ( $ result , $ query ) ; } return false ; }
Method to hydrate and return a single QueryBuilder result.

@param QueryBuilder $query

@return Entity|false
Method to hydrate and return a single QueryBuilder result .