src/EntityQueryBuilder.php
public function getEntityAlias()
    {
        if (!$this->entityAlias) {
            $className       = $this->getEntityClassName();
            $reflectionCLass = new ReflectionClass($className);

            if (is_string($reflectionCLass->getConstant('ALIAS_NAME'))) {
                $this->entityAlias = $reflectionCLass->getConstant('ALIAS_NAME');
            } else {
                if (method_exists($this->getRepository(), 'getEntityAlias')) {
                    $this->entityAlias = $this->getRepository()->getEntityAlias();
                } else {
                    $this->entityAlias = end(explode('\\', $className));
                }
            }

            $this->entityAlias = str_replace('.', '', $this->entityAlias);
        }

        return $this->entityAlias;
    }
public function getEntityAlias()
    {
        if (!$this->entityAlias) {
            $className       = $this->getEntityClassName();
            $reflectionCLass = new ReflectionClass($className);

            if (is_string($reflectionCLass->getConstant('ALIAS_NAME'))) {
                $this->entityAlias = $reflectionCLass->getConstant('ALIAS_NAME');
            } else {
                if (method_exists($this->getRepository(), 'getEntityAlias')) {
                    $this->entityAlias = $this->getRepository()->getEntityAlias();
                } else {
                    $this->entityAlias = end(explode('\\', $className));
                }
            }

            $this->entityAlias = str_replace('.', '', $this->entityAlias);
        }

        return $this->entityAlias;
    }
Get related entity alias used in query. Will be used entity class name without namespace

@return string
@throws \ReflectionException