src/Entity/Hydrator/Strategy/OrganizationNameStrategy.php
public function hydrate($value)
    {
        $organizationNameEntity = $value;
        if (is_string($value)) {
            if (!isset($this->repository)) {
                throw new \InvalidArgumentException('OrganizationNameStrategy needs to access to the Repository');
            }
            if (!$this->repository instanceof OrganizationNameRepository) {
                throw new \InvalidArgumentException('OrganizationNameStrategy repository needs to be of the class Organizations\Repository\OrganizationName');
            }
            $organizationNameEntity = $this->repository->findbyName($value);
        }
        return $organizationNameEntity;
    }
public function hydrate($value)
    {
        $organizationNameEntity = $value;
        if (is_string($value)) {
            if (!isset($this->repository)) {
                throw new \InvalidArgumentException('OrganizationNameStrategy needs to access to the Repository');
            }
            if (!$this->repository instanceof OrganizationNameRepository) {
                throw new \InvalidArgumentException('OrganizationNameStrategy repository needs to be of the class Organizations\Repository\OrganizationName');
            }
            $organizationNameEntity = $this->repository->findbyName($value);
        }
        return $organizationNameEntity;
    }
@param mixed $value

@return mixed|object