Collection.prototype.find can show some warning if option is unrecognized.

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: 3.0.4
    • Component/s: Docs
    • None
    • None
    • None
    • None
    • None
    • None

      I wrote a find query in the shell way

      User.collction.find({}, {passwordHash: false})
        .toArray()
        ...
      

      This code doesn't work as expected in mongo-node. I assume people will assume that mongo-shell and mongo-node has the same API, so this programmer error is going to happen a lot.

      Therefore it will be helpful if a warning or error is raised when option provided is unrecognized/unknown.

            Assignee:
            Unassigned
            Reporter:
            Jiawen Chen
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: