public function getDefaultRepositoryFactory($classMetadata)
    {
        if (!is_callable($this->defaultRepositoryFactory)) {
            throw new \RuntimeException('Unable to handle unmapped data without a defaultRepositoryFactory set', 1);
        }

        $factory = $this->defaultRepositoryFactory;

        return $factory($classMetadata);
    }