private function scheduleForDeletion($object)
    {
        $oid = spl_object_hash($object);
        if (isset($this->documentInsertions[$oid])) {
            if ($this->isInIdentityMap($object)) {
                $this->removeFromIdentityMap($object);
            }

            unset($this->documentInsertions[$oid], $this->documentStates[$oid]);

            return;
        }

        if (! $this->isInIdentityMap($object)) {
            return;
        }

        $this->removeFromIdentityMap($object);
        unset($this->documentUpdates[$oid]);

        $this->documentDeletions[$oid] = $object;
        $this->documentStates[$oid] = self::STATE_REMOVED;
    }