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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1
    • Component/s: None
    • Environment:
      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

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: