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:
183183
184184.. code-block:: java
185185
186- collection.replaceOne(query, replacementDocument );
186+ collection.replaceOne(< query>, <replacement> );
187187
188188Replace Operation Parameters
189189~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change @@ -46,10 +46,10 @@ public static void main(String [] args){
4646 private void updateOneExample (){
4747 // Creates a filter and update document to change the value of ``color``
4848 // begin updateOneExample
49- Bson filter = Filters .eq ("qty" , "0" );
49+ Bson filter = Filters .eq ("qty" , 0 );
5050 Bson update = Updates .set ("color" , "dandelion" );
5151
52- // Updates first document and prints the number of matched and modified documents
52+ // Updates first matching document
5353 UpdateResult result = collection .updateOne (filter , update );
5454 // end updateOneExample
5555
You can’t perform that action at this time.
0 commit comments