You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/asciidoc/reference/mongodb.adoc
+4-3
Original file line number
Diff line number
Diff line change
@@ -2419,13 +2419,14 @@ NOTE: Collection creation allows customization via `CollectionOptions` and suppo
2419
2419
[[mongo-template.commands]]
2420
2420
== Executing Commands
2421
2421
2422
-
You can also get at the MongoDB driver's `DB.command( )` method using the `executeCommand(…)` methods on `MongoTemplate`. These will also perform exception translation into Spring's `DataAccessException` hierarchy.
2422
+
You can also get at the MongoDB driver's `MongoDatabase.runCommand( )` method using the `executeCommand(…)` methods on `MongoTemplate`. These will also perform exception translation into Spring's `DataAccessException` hierarchy.
2423
2423
2424
2424
[[mongo-template.commands.execution]]
2425
2425
=== Methods for executing commands
2426
2426
2427
-
* `CommandResult` *executeCommand* `(Document command)` Execute a MongoDB command.
2428
-
* `CommandResult` *executeCommand* `(String jsonCommand)` Execute the a MongoDB command expressed as a JSON string.
2427
+
* `Document` *executeCommand* `(Document command)` Execute a MongoDB command.
2428
+
* `Document` *executeCommand* `(Document command, ReadPreference readPreference)` Execute a MongoDB command using the given nullable MongoDB `ReadPreference`.
2429
+
* `Document` *executeCommand* `(String jsonCommand)` Execute the a MongoDB command expressed as a JSON string.
0 commit comments