[CDRIVER-1060] Bulk write updates require $set, but regular updates do not Created: 05/Jan/16 Updated: 05/Jan/16 Resolved: 05/Jan/16 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tess Avitabile (Inactive) | Assignee: | Hannes Magnusson |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
produces the error
However, mongoc_collection_update allows updating without $set. |
| Comments |
| Comment by Hannes Magnusson [ 05/Jan/16 ] |
|
This behaviour originates from the CRUD spec - Update vs. Replace Validation The idea is to prevent people from accidentally replacing an entire object. For normal updates use mongoc_bulk_operation_update and to replace entire object use mongoc_bulk_operation_replace. |