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

find BinData without new Shell

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.0.2
    • JavaScript
    • None
    • ALL

    Description

      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==") }

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: