protected function getEntityClass($entityClass)
    {
        if (!isset($this->entityClasses[$entityClass])) {

            $found = class_exists($entityClass);

            if ($found) {
                $reflection = new \ReflectionClass($entityClass);
                $fqcn = '\\' . $reflection->getName();
            } elseif (strpos('\\', $entityClass) !== 0) {
                foreach ($this->entityNamespaces as $namespace) {
                    $fqcn = '\\' . trim($namespace, '\\') . '\\' . $entityClass;
                    if (class_exists($fqcn)) {
                        $found = true;
                        break;
                    }
                }
            }

            if (!$found) {
                throw new \DomainException('Entity class not found: ' . $entityClass);
            }

            $this->entityClasses[$entityClass] = $fqcn;
        }

        return $this->entityClasses[$entityClass];
    }