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

find BinData without new Shell

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.2
    • Component/s: JavaScript
    • None
    • ALL

      Create simple bin data:

      > db.uuid.save({_id : new BinData(3, "Y0pfMW5Mb2pT1uz5+u1Ckw==")})
      > db.uuid.save({_id : new BinData(3, "okiGox+XG637qdDet1rinw==")})

      Correct: An example that correctly returns the document:

      > db.uuid.find({_id : new BinData(3, "okiGox+XG637qdDet1rinw==")})

      Error: If I forget the "new" then instead of zero docs I get all records:

      > db.uuid.find({_id : BinData(3, "okiGox+XG637qdDet1rinw==")})

      { "_id" : BinData(3,"Y0pfMW5Mb2pT1uz5+u1Ckw==") } { "_id" : BinData(3,"okiGox+XG637qdDet1rinw==") }

            Assignee:
            Unassigned Unassigned
            Reporter:
            charris Chris Harris
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: