protected function fetchDBRef($typeName, $dbref)
    {
        $typeName = $this->getFullType($typeName);
        if (class_exists($typeName) && MongoDBRef::isRef($dbref)) {
            $collectionName = $typeName::getCollection();
            $collection = $this->_collection->db->$collectionName;
            $data = $this->_cache->fetch("{$collectionName}_{$dbref['$id']}");
            if ($data === null) {
                $data = $this->_collection->getDBRef($dbref);
            }
            if ($data === null) {
                return null;
            }
            return new $typeName($data, $collection, $this->_cache);
        }
        return null;
    }