protected function callRepositoryMethod(string $method, ...$args)
    {
        $om = $this->getManager();
        $repo = $om->getRepository($this->getEntity());

        if (!method_exists($repo, $method) || !is_callable([$repo, $method])) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Method "%s" doesn\'t exist or isn\'t callable in EntityRepository "%s"',
                    $method,
                    get_class($repo)
                )
            );
        }

        return $repo->$method(...$args);
    }