diff --git a/src/IDF/Tag.php b/src/IDF/Tag.php index a996b4a..ee127ec 100644 --- a/src/IDF/Tag.php +++ b/src/IDF/Tag.php @@ -76,13 +76,14 @@ class IDF_Tag extends Pluf_Model ); $table = $this->_con->pfx.'idf_project_idf_tag_assoc'; + $cols = implode(', ', array_keys($this->_a['cols'])); $this->_a['views'] = array( 'join_projects' => array( 'join' => 'LEFT JOIN '.$table .' ON idf_tag_id=id', 'select' => $this->getSelect().',COUNT(idf_project_id) as project_count', - 'group' => 'id', + 'group' => $cols, 'props' => array('project_count' => 'project_count'), ), );