[JAVA-3778] Add a Filters.empty() method Created: 09/Jul/20  Updated: 28/Oct/23  Resolved: 14/Sep/20

Status: Closed
Project: Java Driver
Component/s: Builders
Affects Version/s: None
Fix Version/s: 4.2.0

Type: New Feature Priority: Major - P3
Reporter: Gyula Lakatos Assignee: Brian DeLeonardis (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
Documentation Changes: Needed
Documentation Changes Summary:

Documentation changes have been made as part of the commit, but will need to be ported over to the new documentation site.


 Description   

At the moment I need to write the following:

 

exampleCollection.updateMany(new Document(), set("status", status))

It would be a lot more self-descriptive to use a method like Filters.empty() to achieve the same result:

 

 

exampleCollection.updateMany(empty(), set("status", status))

 

 



 Comments   
Comment by Githook User [ 08/Sep/20 ]

Author:

{'name': 'Brian DeLeonardis', 'email': 'bdeleonardis1@gmail.com', 'username': 'bdeleonardis1'}

Message: Add empty filter builder

JAVA-3778
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/0768bbb1ee0bbc05ac117c34c87275ba1b42eeb7

Generated at Thu Feb 08 09:00:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.