We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a61ef1b commit e58ccb5Copy full SHA for e58ccb5
mongodb-driver/src/main/java/org/jnosql/diana/mongodb/document/MongoDBDocumentCollectionManager.java
@@ -127,8 +127,7 @@ public void delete(DocumentDeleteQuery query) {
127
128
String collectionName = query.getDocumentCollection();
129
MongoCollection<Document> collection = mongoDatabase.getCollection(collectionName);
130
- Bson mongoDBQuery = DocumentQueryConversor.convert(query.getCondition()
131
- .orElseThrow(() -> new IllegalArgumentException("condition is required")));
+ Bson mongoDBQuery = query.getCondition().map(DocumentQueryConversor::convert).orElse(EMPTY);;
132
collection.deleteMany(mongoDBQuery);
133
}
134
0 commit comments