Commit 94826936 authored by Katherine Walker's avatar Katherine Walker Committed by Katherine Walker

Add version to docs and object casting to command prep

parent cfeaec21
......@@ -34,9 +34,18 @@ post: |
Document validation requires MongoDB 3.2 or later: if you are using an earlier
version of MongoDB, this option will be ignored.
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: hint
arg_name: option
name: hint
type: string|array|object
description: |
The index to use. Specify either the index name as a string or the index key
pattern as a document. If specified, then the query system will only consider
plans using the hinted index.
.. versionadded:: 1.3
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-common-option.yaml
......
......@@ -281,7 +281,7 @@ class Aggregate implements Executable
}
if (isset($this->options['hint'])) {
$cmd['hint'] = $this->options['hint'];
$cmd['hint'] = is_array($this->options['hint']) ? (object) $this->options['hint'] : $this->options['hint'];
}
if (isset($this->options['maxTimeMS'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment