system/classes/Model.php
protected function _getRelation($attributeName, $query = false, $loadMap = false, $record = false)
    {
      // Grab attribute definition
      $def = $this->model_attributes[$attributeName];
      $result = false;
      
      if (isset($def['models'])) {
        $result = $this->_getModels($attributeName, $def['models'], $query, $loadMap, $record);
      } 
      
      else if (isset($def['model'])) {
        $result = $this->_getModel($attributeName, $def['model'], $query, $loadMap, $record);
      }

      return $result;
    }
protected function _getRelation($attributeName, $query = false, $loadMap = false, $record = false)
    {
      // Grab attribute definition
      $def = $this->model_attributes[$attributeName];
      $result = false;
      
      if (isset($def['models'])) {
        $result = $this->_getModels($attributeName, $def['models'], $query, $loadMap, $record);
      } 
      
      else if (isset($def['model'])) {
        $result = $this->_getModel($attributeName, $def['model'], $query, $loadMap, $record);
      }

      return $result;
    }
Returns related models. May return a single model, or a collection depending on if the relationship is
defined as singular or plural. If attribute is not a relationship, then will return false.

@return Model or False