Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-713

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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 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

      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@mongodb.com Robert Stam
            Reporter:
            kanders Keith Anders
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: