Я пытаюсь найти фильтр в моем mongoDB.Для этого я использую find({}).project({a:0, b:1})
, его работа!
Но при попытке find({}).project({a.b.c:0, b.c.d:1})
я получаю возврат:
{ MongoError: Projection cannot have a mix of inclusion and exclusion.
at Connection.<anonymous> (/Users/joaquimflavio/Documents/GitHub/Simemap_repo/lambda_get_mongo/node_modules/mongodb/lib/core/connection/pool.js:466:61)
at Connection.emit (events.js:189:13)
at processMessage (/Users/joaquimflavio/Documents/GitHub/Simemap_repo/lambda_get_mongo/node_modules/mongodb/lib/core/connection/connection.js:364:10)
at Socket.<anonymous> (/Users/joaquimflavio/Documents/GitHub/Simemap_repo/lambda_get_mongo/node_modules/mongodb/lib/core/connection/connection.js:533:15)
at Socket.emit (events.js:189:13)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
ok: 0,
errmsg: 'Projection cannot have a mix of inclusion and exclusion.',
code: 2,
codeName: 'BadValue',
name: 'MongoError',
[Symbol(mongoErrorContextSymbol)]: {} }