protected function cleanup($entityName, array $collection, array $conditions)
    {
        if (!$existing = $this->isCleanupNecessary($entityName, $conditions)) {
            return;
        }

        $identifiers = [];
        foreach ($collection as $instance) {
            $identifiers[] = $this->identifyEntity($instance, $entityName);
        }

        foreach ($existing as $instance) {
            if (in_array($this->identifyEntity($instance, $entityName), $identifiers)) {
                continue;
            }

            $this->storage->delete($instance, $entityName)->execute();
        }

        return;
    }