public function getRelatedFields()
    {
        if (is_string($this->relation->toModel)) {
            throw new ValueError(
                sprintf(
                    'Related model "%s" cannot be resolved',
                    $this->relation->toModel
                )
            );
        }
        // owning side of a relation

        if (BaseOrm::RECURSIVE_RELATIONSHIP_CONSTANT == $this->fromField) {
            $this->fromField = $this;
        } elseif (is_string($this->fromField)) {
            $this->fromField = $this->scopeModel->getMeta()->getField($this->fromField);
        }

        //inverse side of a relation
        if (is_string($this->toField)) {
            $this->toField = $this->relation->toModel->getMeta()->getField($this->toField);
        } else {
            $this->toField = $this->relation->toModel->getMeta()->primaryKey;
        }

        return [$this->fromField, $this->toField];
    }