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;
    }