protected function loadField($modelFieldInfo, &$parameter, $result) {
    if ($modelFieldInfo->isMABIModel) {
      if (empty($result)) {
        $parameter = NULL;
      }
      else {
        /**
         * @var $model \MABI\Model
         */
        $model = call_user_func($modelFieldInfo->type . '::init', $this->app);
        $model->load($result);
        $parameter = $model;
      }
    }
    else {
      switch ($modelFieldInfo->type) {
        case 'string':
          $parameter = $result;
          break;
        case 'int':
          $parameter = intval($result);
          break;
        case 'bool':
          $parameter = $result == TRUE;
          break;
        case 'float':
          $parameter = floatval($result);
          break;
        case 'DateTime':
        case '\DateTime':
          if (empty($result)) {
            $parameter = NULL;
          }
          else {
            $parameter = new \DateTime('@' . $result);
          }
          break;
        case '':
        case 'array':
          $parameter = $result;
      }
    };
  }