-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 2.0.0
-
Component/s: JavaScript, Shell
-
Environment:Mac OSX, linux (Centos 5.6)
-
ALL
> db.bindata.insert(
{ foo: BinData(0,"gpJOnIbX+ZJkAwTZpAw=")})
> db.bindata.find()
so BinData(0,"gpJOnIbX+ZJkAwTZpAw=")produces null..
> db.bindata.insert(
{ foo: HexData(0,"5555")})
> db.bindata.find()
whereas HexData(0, "5555") produces a non-null value, as expected.
If I use the new keyword with BinData, it does what I expect:
> db.bindata.insert(
{ foo: new BinData(0,"gpJOnIbX+ZJkAwTZpAw=")})
> db.bindata.find()
and..
> db.bindata.find(
{foo: new BinData(0,"gpJOnIbX+ZJkAwTZpAw=")})
{ "_id" : ObjectId("4e9d87e15825b60b637815a8"), "foo" : BinData(0,"gpJOnIbX+ZJkAwTZpAw=") }so, basically "new" needed with BinData, but not HexData.
- is duplicated by
-
SERVER-5203 find BinData without new Shell
- Closed