Skip to content
Permalink
Browse files

Joins are an integral parat of a query, keeping them for count operat…

…ions

Fixes #4511
  • Loading branch information...
lorenzo committed Sep 6, 2014
1 parent 7458089 commit be67ce819bba92020764d0d49530fce6580ef0d8
Showing with 1 addition and 1 deletion.
  1. +1 −0 src/ORM/Association/SelectableAssociationTrait.php
  2. +0 −1 src/ORM/Query.php
@@ -160,6 +160,7 @@ protected function _addFilteringCondition($query, $key, $filter) {
*/
protected function _buildSubquery($query) {
$filterQuery = $query->cleanCopy();
$filterQuery->contain([], true);
$joins = $filterQuery->join();
foreach ($joins as $i => $join) {
@@ -492,7 +492,6 @@ public function cleanCopy() {
$query->offset(null);
$query->mapReduce(null, null, true);
$query->formatResults(null, true);
$query->contain([], true);
return $query;
}

0 comments on commit be67ce8

Please sign in to comment.
You can’t perform that action at this time.