|
aggregate fails when the _id is projected out with 4.1.1-293-g3927b18
PRIMARY> db.test.insertOne({foo:1})
|
{
|
"acknowledged" : true,
|
"insertedId" : ObjectId("5b6e094002374d6d7383f3e2")
|
}
|
PRIMARY> db.test.aggregate([{"$project": {"_id": false, "foo": true}}])
|
{ "foo" : 1 }
|
PRIMARY> db.test.aggregate([{"$project": {"_id": false, "foo": true}}, {'$out': 'output-collection'}])
|
assert: command failed: {
|
"operationTime" : Timestamp(1533937989, 2),
|
"ok" : 0,
|
"errmsg" : "Failed to extract unique key from input document: { foo: 1.0 }",
|
"code" : 50905,
|
"codeName" : "Location50905",
|
"$clusterTime" : {
|
"clusterTime" : Timestamp(1533937989, 2),
|
"signature" : {
|
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
|
"keyId" : NumberLong(0)
|
}
|
}
|
} : aggregate failed
|
Tested on:
$ ~/Downloads/mongodb-macos-x86_64-enterprise-4.1.1-293-g3927b18/bin/mongod --version
|
db version v4.1.1-293-g3927b18
|
git version: 3927b187d07cd5e9c9ebba26ecf9500b261f57fc
|
allocator: system
|
modules: enterprise
|
build environment:
|
distarch: x86_64
|
target_arch: x86_64
|
|