public function getTarget($getLive = false)
    {
        if ($this->TargetID && $this->TargetClass) {
            $versionable = Injector::inst()->get($this->TargetClass)->has_extension(Versioned::class);
            $targetObject = null;

            if (!$versionable && $getLive) {
                return;
            }
            if ($versionable) {
                $targetObject = Versioned::get_by_stage(
                    $this->TargetClass,
                    $getLive ? Versioned::LIVE : Versioned::DRAFT
                )->byID($this->TargetID);
            }
            if (!$targetObject) {
                $targetObject = DataObject::get_by_id($this->TargetClass, $this->TargetID);
            }

            return $targetObject;
        }
    }