diff --git a/src/Capsule/Collection.php b/src/Capsule/Collection.php index 3298744..14077d3 100644 --- a/src/Capsule/Collection.php +++ b/src/Capsule/Collection.php @@ -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));