Skip to content

deleteMany doesn' work #159

Open
Open
@LucVidal360

Description

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.

Activity

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

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions