[DOCS-957] findAndModify 2.2 Release Notes Unclear on the Command's Response Created: 07/Jan/13 Updated: 07/Jan/13 Resolved: 07/Jan/13 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Steve Francia | Assignee: | Sam Kleinman (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 11 years, 6 weeks, 2 days ago |
| Description |
|
http://docs.mongodb.org/manual/release-notes/2.2/#findandmodify-returns-null Behavior outlined is incorrect... claims null returned always (or the odd ok: 1.0 hash), but this isn't the case and the correct behavior is more akin to what one would expect. > db.t.findAndModify({query: {name: "Steve"}, upsert: true, update: {name: "John"}}) , upsert: true, update: {name: "Johnny"}}) { "_id" : ObjectId("50eb188773015b3832f64dda"), "name" : "John" }> db.t.findAndModify({query: {name: "Tyler"}, new: true, upsert: true, update: {name: "Johnny"}}) { "_id" : ObjectId("50eb18e473015b3832f64ddc"), "name" : "Johnny" }> |
| Comments |
| Comment by auto [ 07/Jan/13 ] |
|
Author: {u'date': u'2013-01-07T20:33:27Z', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}Message: |
| Comment by Steve Francia [ 07/Jan/13 ] |
|
reviewed. It looks right to me now. Best, * |
| Comment by Sam Kleinman (Inactive) [ 07/Jan/13 ] |
|
Changes made in referenced commit spf13, tyler@10gen.com, and skot could you please review? |
| Comment by Steve Francia [ 07/Jan/13 ] |
|
Totally understand and it's documenting the command inaccurately. I just reviewed it with Sam and he's now clear on what should be done. |
| Comment by auto [ 07/Jan/13 ] |
|
Author: {u'date': u'2013-01-07T19:31:03Z', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}Message: |
| Comment by Scott Hernandez (Inactive) [ 07/Jan/13 ] |
|
Steve, that is documenting the command, not the shell helper. There is a big difference... and maybe we can make that more clear for people who don't see that immediately. |