Skip to content

Commit

Permalink
[Profiler]
Browse files Browse the repository at this point in the history
- read preference set in options overwrites the connection one
  • Loading branch information
Alessandro Galli committed Aug 25, 2017
1 parent 8bb7e59 commit 617a2d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Capsule/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ private function prepareQuery(string $method, $filters = null, $data = null, arr
$query->setMethod($method);
$query->setCollection($this->getCollectionName());
$query->setReadPreference(
$this->translateReadPreference($this->__debugInfo()['readPreference'])
$this->translateReadPreference($options['readPreference'] ?? $this->__debugInfo()['readPreference'])
);

$this->eventDispatcher->dispatch(QueryEvent::QUERY_PREPARED, new QueryEvent($query));
Expand Down

0 comments on commit 617a2d9

Please sign in to comment.