public function getJoinFields()
    {
        $fields = null;
        $tmpFields = array();
        $joins = $this->_sql->getJoins();

        if (count($joins) > 0) {
            foreach ($joins as $join) {

                $tmpJoin = array();
                foreach ($join['fields'] as $field) {
                    $tmpJoin[] = "{$join['table']}.{$field}";
                }
                $str = implode(', ', $tmpJoin);
                if (strlen($str) > 1) {
                    $tmpFields[] = implode(', ', $tmpJoin);
                }
            }
            $fields = ', '. implode(', ', $tmpFields);
            if (trim($fields) == ',') $fields = null;
        }

        return $fields;
    }