public function getParent()
    {
        if ($this->parentRelation === null && $this->isParentRelationResolved === false) {
            $this->isParentRelationResolved = true;

            try {
                $source = $this->getObject();
                if ($source instanceof AttachmentContainerInterface) {
                    $model = $this->modelFactory()->create(self::class)->loadFrom('attachment_id', $source->id());
                    if ($model->id()) {
                        $this->parentRelation = $model;
                    }
                }
            } catch (Exception $e) {
                throw new LogicException(sprintf(
                    'Could not load the parent relationship: %s',
                    $e->getMessage()
                ), 0, $e);
            }
        }

        return $this->parentRelation;
    }