[SERVER-328] optinally don't check field names in JS (WAS: field names cannot start with $ [$set]) Created: 01/Oct/09  Updated: 12/Jul/16  Resolved: 02/Oct/09

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: 1.0.0
Fix Version/s: 1.1.2

Type: Improvement Priority: Trivial - P5
Reporter: gf Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

FreeBSD


Participants:

 Description   

> db.eval("var cursor = db.oplog.$main.find(); while (row = cursor.next()) db.tempOplog.save(row);");
Thu Oct 1 22:09:45 JS Error: uncaught exception:

{"errno" : -3 , "errmsg" : "invoke failed: JS Error: uncaught exception: field names cannot start with $ [$set] " , "ok" : 0}

local
>



 Comments   
Comment by Eliot Horowitz (Inactive) [ 16/Oct/09 ]

release 10/16/2009

Comment by Eliot Horowitz (Inactive) [ 02/Oct/09 ]

2nd optional parameter to insert

.insert(

{ $set : 1 }

, true );
will allow this

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