Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12672

Wrong collection name is specified in the example for $where usage

    XMLWordPrintableJSON

Details

    Description

      Description

      In the example here we say:

      Consider the following documents in the users collection:

      However, the following code that shows how $where can be used is using collection name foo instead:

      db.foo.find( { $where: function() {
         return (hex_md5(this.name) == "9b53e667f30cd329dca1ec9e6a83e994")
      } } );
      

      It should be instead:

      db.users.find( { $where: function() {
         return (hex_md5(this.name) == "9b53e667f30cd329dca1ec9e6a83e994")
      } } );
      

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Activity

          People

            kay.kim@mongodb.com Kay Kim (Inactive)
            dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              4 years, 40 weeks, 6 days ago