denodrivers / denodrivers/mongo
Excluding one field from findOnde result
Open
- Dominant language
- TypeScript
- Stars
- 511
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to exclude the password field from the findOne result with no luck. Here's my code:
```
const result : any = await serviceProvidersCollection.findOne(
{ _id: new Bson.ObjectId(id) },
{ password: 0 },
// @ts-ignore
{ noCursorTimeout: false }
);
```
But I get this error message; "noTimeout cursors are disallowed in this atlas tier" from mongodb atlas. So I don't know who is causing it.
Do you know the proper way of handling this?
Thanks in advance...
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.