Skip to content

Commit

Permalink
Removing magic left join elimation for subquery strategy.
Browse files Browse the repository at this point in the history
This was extremely error prone as some in the core team figured out,
and was only solving a cosmetic issue.
  • Loading branch information
lorenzo committed Sep 26, 2014
1 parent b6ab4da commit 100e1a4
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/ORM/Association/SelectableAssociationTrait.php
Expand Up @@ -224,20 +224,12 @@ protected function _buildSubquery($query) {
$filterQuery->offset(null);
}

$joins = $filterQuery->join();
foreach ($joins as $i => $join) {
if (strtolower($join['type']) !== 'inner') {
unset($joins[$i]);
}
}

$keys = (array)$query->repository()->primaryKey();

if ($this->type() === $this::MANY_TO_ONE) {
$keys = (array)$this->foreignKey();
}

$filterQuery->join($joins, [], true);
$fields = $query->aliasFields($keys);
return $filterQuery->select($fields, true);
}
Expand Down

0 comments on commit 100e1a4

Please sign in to comment.