[SERVER-5203] find BinData without new Shell Created: 05/Mar/12  Updated: 15/Aug/12  Resolved: 05/Mar/12

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: 2.0.2
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Chris Harris Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-4093 BinData requires constructor in shell... Closed
Operating System: ALL
Participants:

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

 Comments   
Comment by Scott Hernandez (Inactive) [ 05/Mar/12 ]

SERVER-4093

Generated at Thu Feb 08 03:08:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.