public function addColumns(array $columns, $joinName=null) {
    if ($joinName === null) {
      // add normal column
      $this->columns = $this->columns + $columns;
    }
    else {
      // add column to join
      $joins = [];
      foreach ($this->joins->getJoins() as $join) {
        if ($join['name'] == $joinName || in_array($joinName, array_keys($join['name']))) {
          $join['columns'] += $columns;
        }
        $joins[] = $join;
      }
      $this->joins->reset();
      foreach ($joins as $join) {
        parent::join($join['name'], $join['on'], $join['columns'], $join['type']);
      }
    }
  }