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

DBRefs fail for _id values which are false

    • ALL

      DBRef breaks in the shell when _id is 0, or null, or other valid _ids that happen to evaluate to false:

      > new DBRef("a", 0).fetch()
      assert failed : need an id
      Error("Printing Stack Trace")@:0
      ()@shell/utils.js:35
      ("assert failed : need an id")@shell/utils.js:46
      (0,"need an id")@shell/utils.js:54
      ()@shell/utils.js:572
      @(shell):1

      In shell/utils.js, DBRef.prototype.fetch should be:

      assert(typeof(this.ns) !== 'undefined');
      assert(typeof(this.id) !== 'undefined');

            Assignee:
            backlog-server-platform DO NOT USE - Backlog - Platform Team
            Reporter:
            glenn Glenn Maynard
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: