protected function getJoins()
    {
        $joins = [];
        $fields = array_merge($this->sortFields, $this->selectFields, $this->searchFields, $this->expressionFields);

        foreach ($fields as $field) {
            $joins = array_merge($joins, $field->getJoins());
        }

        return $joins;
    }