private function setAssociationValue($instance, $fieldName, $value, $target, $id)
    {
        $targetRepo = $this->om->getRepository($target);
        $target = $targetRepo->findBy([$id => $value]);

        if (null === $target) {
            throw new \InvalidArgumentException(sprintf('The specified mapped field "%s" couldn\'t be found with the Id "%s".', $fieldName, $value));
        }

        ObjectFieldUtil::setFieldValue($instance, $fieldName, $target[0]);
    }