MongoDB Enterprise replset:PRIMARY> use testdb
switched to db testdb
MongoDB Enterprise replset:PRIMARY> db.source.insertOne({})
{
"acknowledged" : true,
"insertedId" : ObjectId("60c088057ddf468ccc60c5e6")
}
MongoDB Enterprise replset:PRIMARY> db.createView('view', 'source', [{$match: {}}])
{
"ok" : 1,
"$clusterTime" : {
"clusterTime" : Timestamp(1623230493, 2),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
},
"operationTime" : Timestamp(1623230493, 2)
}
MongoDB Enterprise replset:PRIMARY> db.view.find()
Error: error: {
"ok" : 0,
"errmsg" : "BSON field 'aggregate.runtimeConstants' is not allowed with apiStrict:true.",
"code" : 323,
"codeName" : "APIStrictError",
"$clusterTime" : {
"clusterTime" : Timestamp(1623230493, 2),
"signature" : {
"hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="),
"keyId" : NumberLong(0)
}
},
"operationTime" : Timestamp(1623230493, 2)
}