[SERVER-288] add _id client-side, and change API such that users can get _id of an inserted document Created: 10/Sep/09 Updated: 12/Jul/16 Resolved: 27/Jan/10 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Client |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.2 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Michael Dirolf | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Comments |
| Comment by Mathias Stearn [ 27/Jan/10 ] |
|
To avoid breaking existing code we return the _id without modifying the passed in object. If you want the the passed in object to be modified, use save() |
| Comment by auto [ 27/Jan/10 ] |
|
Author: {'login': 'RedBeard0531', 'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: db.c.insert() now generates and returns _id. |