[CSHARP-58] MongoCollection<T>.FindAndModify doesn't work when updating an whole document. Created: 26/Aug/10 Updated: 19/Oct/16 Resolved: 11/Nov/10 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | SAMUS |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Gabriel Duford | Assignee: | Sam Corder |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
samus-mongodb-csharp-85d3524 |
||
| Description |
|
MongoCollection<T>.FindAndModify doesn't work when updating an whole document. }; On the other side, the following (supposedly equivalent) works fine: , , , , {"upsert", false}}; The bug seems to be on line 217 of MongoCollection_1.cs (as per version given in "Environment"): {"update", EnsureUpdateDocument(document)}EnsureUpdateDocument will create a new document with a $set. Clearly, from the example above, this should not be done. |
| Comments |
| Comment by Steve Wagner [ 11/Nov/10 ] |
|
Migrated to https://github.com/mongodb-csharp/mongodb-csharp/issues/issue/25 |