private function createRepositoryDefinition()
    {
        $id = $this->getServiceId('repository');
        if (!$this->container->has($id)) {
            $definition = new Definition($class = $this->getServiceClass('repository'));
            $definition->setArguments([
                new Reference($this->getServiceId('manager')),
                new Reference($this->getServiceId('metadata'))
            ]);
            if (is_array($this->options['translation'])) {
                $definition
                    ->addMethodCall('setLocaleProvider', [new Reference('ekyna_core.locale_provider.request')]) // TODO alias / configurable ?
                    ->addMethodCall('setTranslatableFields', [$this->options['translation']['fields']])
                ;
            }
            $this->container->setDefinition($id, $definition);
        }
    }