lib/components/db/behaviors/PrimaryRelation.php
public function getRelationship()
    {
        if (is_null($this->_relationship)) {
            $parentObject = $this->owner->getParentObject(false);
            $childObject = $this->owner->getChildObject(false);
            if ($parentObject && $childObject) {
                if (empty($parentObject->objectTypeItem) || empty($childObject->objectTypeItem)) {
                    return false;
                }
                $this->_relationship = Relationship::getOne($parentObject->objectTypeItem, $childObject->objectTypeItem);
            }
        }

        return $this->_relationship;
    }
public function getRelationship()
    {
        if (is_null($this->_relationship)) {
            $parentObject = $this->owner->getParentObject(false);
            $childObject = $this->owner->getChildObject(false);
            if ($parentObject && $childObject) {
                if (empty($parentObject->objectTypeItem) || empty($childObject->objectTypeItem)) {
                    return false;
                }
                $this->_relationship = Relationship::getOne($parentObject->objectTypeItem, $childObject->objectTypeItem);
            }
        }

        return $this->_relationship;
    }
public function getRelationship ( ) { if ( is_null ( $ this -> _relationship ) ) { $ parentObject = $ this -> owner -> getParentObject ( false ) ; $ childObject = $ this -> owner -> getChildObject ( false ) ; if ( $ parentObject && $ childObject ) { if ( empty ( $ parentObject -> objectTypeItem ) || empty ( $ childObject -> objectTypeItem ) ) { return false ; } $ this -> _relationship = Relationship :: getOne ( $ parentObject -> objectTypeItem , $ childObject -> objectTypeItem ) ; } } return $ this -> _relationship ; }
Get relationship.

@return [[@doctodo return_type:getRelationship]] [[@doctodo return_description:getRelationship]]
Get relationship .