File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
fundamentals/crud/write-operations
includes/fundamentals/code-snippets Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ instance as follows:
183
183
184
184
.. code-block:: java
185
185
186
- collection.replaceOne(query, replacementDocument );
186
+ collection.replaceOne(< query>, <replacement> );
187
187
188
188
Replace Operation Parameters
189
189
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ public static void main(String [] args){
46
46
private void updateOneExample (){
47
47
// Creates a filter and update document to change the value of ``color``
48
48
// begin updateOneExample
49
- Bson filter = Filters .eq ("qty" , "0" );
49
+ Bson filter = Filters .eq ("qty" , 0 );
50
50
Bson update = Updates .set ("color" , "dandelion" );
51
51
52
- // Updates first document and prints the number of matched and modified documents
52
+ // Updates first matching document
53
53
UpdateResult result = collection .updateOne (filter , update );
54
54
// end updateOneExample
55
55
You can’t perform that action at this time.
0 commit comments