private function createConnection(array $persisterConfig, $configName)
    {
        $options = isset($persisterConfig['parameters']['options']) && is_array($persisterConfig['parameters']['options']) ? $persisterConfig['parameters']['options'] : [];
        $definition = new Definition(
            'Doctrine\MongoDB\Connection',
            [$persisterConfig['parameters']['host'], $options, new Reference($configName)]
        );
        $definition->setPublic(false);
        return $definition;
    }