[SERVER-3050] Suppressing output of '_id' from findAndModify causes exception. Created: 05/May/11 Updated: 29/Aug/11 Resolved: 09/May/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.8.1, 1.9.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Bernie Hackett | Assignee: | Mathias Stearn |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Reproduced in Win32 and Linux x86_64 but likely all. |
||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
Repro steps in the mongo shell: > use benchmark ) ) ) If you don't include '_id' in fields or set it to true there is no issue: , , > db.runCommand({'findAndModify': 'scoreboard', 'query': {'user': 'bob', 'score': {'$lt': 10}}, 'update': {'$set': {'score': 10}}, 'upsert': true, 'fields': {'_id': true, 'score': true}}) , }, |