Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deleteMany doesn' work #159

Open
LucVidal360 opened this issue Mar 30, 2023 · 0 comments
Open

deleteMany doesn' work #159

LucVidal360 opened this issue Mar 30, 2023 · 0 comments

Comments

@LucVidal360
Copy link

Problem

It seems deleteMany never deletes anything.
Indeed, it's algorithm is:

  • fetch all documents matching the query with a cursor
  • extract their ids
  • remove the documents in the collection with these ids.

Unfortunately

This means ids never match (because they are not the same instance of ObjectIds), and nothing is ever deleted.

Possible fix

A solution could be to add a secret option to cursor to avoid cloning documents. To use only with deleteMany.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants