[SERVER-5369] $project exclusion doubles _id field in console output Created: 22/Mar/12 Updated: 11/Jul/16 Resolved: 26/Mar/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 2.1.0 |
| Fix Version/s: | 2.1.1 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Doug Hudson | Assignee: | Chris Westin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
uname -a > db.serverBuildInfo() |
||
| Operating System: | Linux |
| Participants: |
| Description |
|
> db.test.save( {a:1,b:2}) ) > db.test.find() { "_id" : ObjectId("4f6ba4a90a07b1052bfdb5e0"), "a" : 1, "b" : 2 } { "_id" : ObjectId("4f6ba4b40a07b1052bfdb5e1"), "a" : 3, "b" : 4 }> db.test.aggregate({$project:{a:0}}) , { "_id" : ObjectId("4f6ba4b40a07b1052bfdb5e1"), "_id" : ObjectId("4f6ba4b40a07b1052bfdb5e1"), "b" : 4 } ], Repeated attribute is obviously not possible, so this seems very minor, but is a bit unexpected to see and object come back like this. |
| Comments |
| Comment by auto [ 20/Jul/12 ] |
|
Author: {u'date': u'2012-07-14T12:04:12-07:00', u'email': u'mathias@10gen.com', u'name': u'Mathias Stearn'}Message: Rewrite ExpressionObject The main difference between this version and the old is that the following // classic inclusion // nested inclusion {'a.b': '$a.b'} // dotted FieldPathExpression // nested FieldPathExpression Additionally support for exclusion of fields other than _id has been Other related bugs:
Remaining TODOs: Disabled test for |
| Comment by auto [ 06/Jul/12 ] |
|
Author: {u'date': u'2012-07-05T13:14:33-07:00', u'email': u'dannenberg.matt@gmail.com', u'name': u'Matt Dannenberg'}Message: fix |
| Comment by auto [ 26/Mar/12 ] |
|
Author: {u'login': u'cwestin', u'name': u'U-tellus\\cwestin', u'email': u'cwestin@10gen.com'}Message: |