Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7433

DBQuery.prototype.comment should behave similarly to sort()

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Shell
    • None
    • ALL

    Description

      It looks like
      DBQuery.prototype.comment clones a cursor and returns its first
      result. And this seems different from other DBQuery functions that
      call _addSpecial() just to modify an existing query (eg
      DBQuery.prototype.sort)

      DBQuery.prototype.comment = function (comment) {
          var n = this.clone();
          n._ensureSpecial();
          n._addSpecial("$comment", comment);
          return this.next();
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: