MongoDatabase.Eval doesn't send argument to server when there is exactly one argument

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.8.1
    • Affects Version/s: 1.8
    • Component/s: None
    • Environment:
      Windows 7 x64, connecting to MongoDB 2.4.0, Visual Studio 2010
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When using db.eval(myJS, "myStringArgument"), any attempt to use the argument in a javascript context will treat it as undefined, and any attempt to use it in a BSON context will use it as BsonNull. In the attached sample solution, the return value of the function comes up as BsonNull, and the document saved to the database is of the form

      { name: null }

      .

              Assignee:
              Robert Stam
              Reporter:
              Keith Anders
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: