private function addAliases(
        ContainerBuilder $container,
        EntityMapping $entityMapping
    ) {
        $entityMappingFilePath = $entityMapping->getEntityMappingFilePath();
        if (strpos($entityMappingFilePath, '@') === 0) {
            $bundleName = trim(explode('/', $entityMappingFilePath, 2)[0]);
            $className = explode('\\', $entityMapping->getEntityNamespace());
            unset($className[count($className) - 1]);
            $configurationServiceDefinition = $container
                ->getDefinition(
                    'doctrine.orm.' . $entityMapping->getEntityManagerName() . '_configuration'
                );

            $configurationServiceDefinition->addMethodCall('addEntityNamespace', [
                $bundleName,
                implode('\\', $className),
            ]);
        }
    }