[CSHARP-1265] Update variants allow sending empty documents as update statements, which results in a replacement Created: 30/Apr/15  Updated: 16/Jul/15  Resolved: 06/May/15

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.0.1, 2.1

Type: Bug Priority: Major - P3
Reporter: Craig Wilson Assignee: Craig Wilson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to JAVA-1795 Collection update methods should thro... Closed

 Description   

This should not be legal due to the second argument being a replacement (i.e., no dollar operators exist.)

await collection.UpdateOneAsync("{x:1}", "{ }");



 Comments   
Comment by Githook User [ 06/May/15 ]

Author:

{u'username': u'craiggwilson', u'name': u'Craig Wilson', u'email': u'craiggwilson@gmail.com'}

Message: CSHARP-1265: Empty update documents should throw an exception.
Branch: v2.0.x
https://github.com/mongodb/mongo-csharp-driver/commit/e7a00dbe6eb3570913d101fbdb73816b622f7124

Comment by Githook User [ 06/May/15 ]

Author:

{u'username': u'craiggwilson', u'name': u'Craig Wilson', u'email': u'craiggwilson@gmail.com'}

Message: CSHARP-1265: Empty update documents should throw an exception.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/1edddfc33dce87769c7fd5545bd0d7c645904b0e

Generated at Wed Feb 07 21:39:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.