[SERVER-4093] BinData requires constructor in shell, unlike HexData Created: 18/Oct/11 Updated: 11/Jul/16 Resolved: 20/Feb/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript, Shell |
| Affects Version/s: | 2.0.0 |
| Fix Version/s: | 2.1.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Mike Atkins | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 1 |
| Labels: | bindata, javascript, shell | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mac OSX, linux (Centos 5.6) |
||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
> db.bindata.insert( { foo: BinData(0,"gpJOnIbX+ZJkAwTZpAw=")}) so BinData(0,"gpJOnIbX+ZJkAwTZpAw=")produces null.. > db.bindata.insert( { foo: HexData(0,"5555")}) whereas HexData(0, "5555") produces a non-null value, as expected. > db.bindata.insert( { foo: new BinData(0,"gpJOnIbX+ZJkAwTZpAw=")}) 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. |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 20/Feb/12 ] | ||||||
|