public function createReference()
    {
        $documentId = $this->getId();
        if (null === $documentId) {
            throw new Exception('Document must be stored to get DBRef');
        }

        return $this
            ->getCollection()
            ->getMongoCollection()
            ->createDBRef($documentId);
    }