Skip to content

Commit

Permalink
Subquery strategy was duplicating results in some cases after recent …
Browse files Browse the repository at this point in the history
…changes.

Adding a distinct() modifier to the query solved this problem and retains the semantincs
of the find operation.
  • Loading branch information
lorenzo committed Jan 29, 2015
1 parent 1097eef commit 32d99b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ORM/Association/SelectableAssociationTrait.php
Expand Up @@ -240,7 +240,7 @@ protected function _buildSubquery($query)
}

$fields = $query->aliasFields($keys, $this->source()->alias());
return $filterQuery->select($fields, true);
return $filterQuery->select($fields, true)->distinct();
}

/**
Expand Down

0 comments on commit 32d99b2

Please sign in to comment.