Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #47 from rprzedzik/hot-fix
Browse files Browse the repository at this point in the history
fix category query incorrect join
  • Loading branch information
rprzedzik committed Jul 25, 2019
2 parents 928b367 + 5932fda commit 5d18802
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ private function getQuery(): QueryBuilder
return $this->connection->createQueryBuilder()
->addSelect('t.elements_count')
->from(self::CATEGORY_TABLE, 'c')
->join('c', '(SELECT count(*) as elements_count, pcp.category_id FROM product_category_product pcp GROUP BY pcp.category_id)', 't', 't.category_id = c.id');
->leftJoin('c', '(SELECT count(*) as elements_count, pcp.category_id FROM product_category_product pcp GROUP BY pcp.category_id)', 't', 't.category_id = c.id');
}
}

0 comments on commit 5d18802

Please sign in to comment.