diff --git a/composer.json b/composer.json index ce32f6407..92b46ef54 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "illuminate/container": "^5.6", "illuminate/database": "^5.6", "illuminate/events": "^5.6", - "mongodb/mongodb": "^1.0.0" + "mongodb/mongodb": "^1.2.0" }, "require-dev": { "phpunit/phpunit": "^6.0|^7.0", diff --git a/src/Jenssegers/Mongodb/Query/Builder.php b/src/Jenssegers/Mongodb/Query/Builder.php index c425f5165..4dae087e4 100644 --- a/src/Jenssegers/Mongodb/Query/Builder.php +++ b/src/Jenssegers/Mongodb/Query/Builder.php @@ -378,7 +378,10 @@ public function getFresh($columns = []) if ($columns) { $options['projection'] = $columns; } - // if ($this->hint) $cursor->hint($this->hint); + + if ($this->hint) { + $options['hint'] = $this->hint; + } // Fix for legacy support, converts the results to arrays instead of objects. $options['typeMap'] = ['root' => 'array', 'document' => 'array'];