[SERVER-276] Object properties with $ doesn't work without quotes in find() Created: 03/Sep/09  Updated: 04/Sep/17  Resolved: 03/Sep/09

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

Type: Bug Priority: Trivial - P5
Reporter: sandstrom Assignee: Eliot Horowitz (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

In the mongo console using $ in property names work, eg:

> var a = {}
> a
{}
> a.$ref = "test"
test
> a.$ref
test

However, in MongoDB when using this in the find method I need to quote the property name for things to work.

db.foo.find(

{"a.$ref":"test"}

)



 Comments   
Comment by Eliot Horowitz (Inactive) [ 03/Sep/09 ]

that is invalid JavaScript syntax,

Generated at Thu Feb 08 02:53:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.