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

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 1.8.1
    • 1.8
    • None
    • Windows 7 x64, connecting to MongoDB 2.4.0, Visual Studio 2010

    Description

      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 }

      .

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            kanders Keith Anders
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: