private function getEntityClass()
    {
        /** @var ClassMetadata $metaData */
        foreach ($this->getDoctrineManager()->getMetadataFactory()->getAllMetadata() as $metaData) {
            if ($metaData->getName() === Config::class) {
                continue;
            }

            $reflectionClass = new \ReflectionClass($metaData->getName());
            if (true === in_array(Config::class, $this->getParentClassNames($reflectionClass))) {
                return $metaData->getName();
            }
        }

        throw new \RuntimeException('Missing config entity!');
    }