public function delete($document): void
    {
        $class = $this->dm->getClassMetadata(get_class($document));
        $id = $class->getSingleIdentifier($document);

        $this->collection->delete((string) $id);
    }