diff --git a/Model/GridSourceType/RepositorySourceType/RepositorySourceFactory.php b/Model/GridSourceType/RepositorySourceType/RepositorySourceFactory.php index bcf5d1be..a9aee29d 100644 --- a/Model/GridSourceType/RepositorySourceType/RepositorySourceFactory.php +++ b/Model/GridSourceType/RepositorySourceType/RepositorySourceFactory.php @@ -51,7 +51,14 @@ public function getRepositoryEntityType(string $sourceConfig): string $class = $this->getSourceRepoClass($sourceConfig); $method = $this->getSourceRepoMethod($sourceConfig); $resultType = $this->reflectionMethodsMap->getMethodReturnType($class, $method); + $resultItemsType = $this->reflectionMethodsMap->getMethodReturnType($resultType, 'getItems'); + if (strpos($resultItemsType, "\\") === false) { + $typeData = explode("\\", $resultType); + unset($typeData[count($typeData) - 1]); + + $resultItemsType = join("\\", $typeData) . "\\$resultItemsType"; + } return substr($resultItemsType, -2) === '[]' ? substr($resultItemsType, 0, -2)