Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-594

Unable to handle 'this' keyword outside of method definition

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: AsyncWriter
    • None
    • Not Needed

      `this` is not allowed inside functions. Prevents the use of functions in $where.

      > db.coll1.find({ $where: function() { return this.x === 1 } })
      MongoshUnimplementedError: Unable to handle 'this' keyword outside of method definition
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            maurizio.casimirri@mongodb.com Maurizio Casimirri
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: