protected function _buildJoins($schemas, $aliases)
    {
        $joins = [];
        foreach ($this->_parts['joins'] as $value) {
            $table = $value['join'];
            $on = $value['on'];
            $type = $value['type'];
            $join = [strtoupper($type), 'JOIN'];
            $join[] = $this->dialect()->name($table);

            if ($on) {
                $join[] = 'ON';
                $join[] = $this->dialect()->conditions($on, compact('schemas', 'aliases'));
            }

            $joins[] = join(' ', $join);
        }
        return $joins ? ' ' . join(' ', $joins) : '';
    }