Skip to content
This repository was archived by the owner on Jul 14, 2019. It is now read-only.
This repository was archived by the owner on Jul 14, 2019. It is now read-only.

Calling update(...) on a collection/model not working #14

@mathiasm74

Description

@mathiasm74

I have a user.js schema file that result in a db.User model. Now I want to remove a field called 'email_verified' from all User documents, like this:

  db.User.update(
    { email_verified: { $exists: true } },  // Query
    { $unset: { email_verified: true  } },  // Update
    { multi: true }                         // Options
  );

But this does nothing. No change. Calling this in the mongo console result in an error, becuase the collection is really called 'users'. calling db.users.update(...) in the console works fine, but result in an error when called from my node.js code (as expected).

So is simpledb preventing the db.User.update(...) call in my node code from working?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions