bububa / MongoHub-Mac

MongoHub mac native version.
http://mongohub.todayclose.com
1.18k stars 315 forks source link

Can't Search By ObjectId #67

Open whobutsb opened 12 years ago

whobutsb commented 12 years ago

Hello!

Whenever I try to search by ObjectId in the find command I get the error: 'Failure parsing JSON string near: _id : Obje' the rest is truncated by the window. I was wondering if there was going to be an update soon to fix this. Below is what i'm entering into the find input box:

{_id : ObjectId('4ecd3613cf72ab053100000a') }

unfo commented 12 years ago

I got this working on 2.3.2[73] out of the box.

whobutsb commented 12 years ago

I found out that you needed to wrap the ID in double quotes in order for it query.

{_id : ObjectId("4ecd3613cf72ab053100000a") }

stickfigure commented 11 years ago

Doesn't work for me, even with doublequotes. v2.5.4[98] on a mac.

sogko commented 10 years ago

Update: I made a mistake, i was using the release from fotonauts fork


I'm facing the same issue (Mac, v2.5.15)

I have the following document and wanted to get it by 'user' objectId

{
  "__v": 0,
  "_id": { "$oid" : "52e014261cbaadc0dd9e2c05" },
  "content": "test",
  "created": { "$date": 1390416934624 },
  "title": "tetetetet",
  "user": { "$oid" : "52e0140c1cbaadc0dd9e2c04" }
}

I tried the following and none of them worked

{"user": ObjectId("52e0140c1cbaadc0dd9e2c04")}

{"user": "52e0140c1cbaadc0dd9e2c04"}