javascript - MongoDB db.system.js.save and loadServerScripts does not work -
i make test on mongodb mongobooster , store function db load , execute it.
so try make example of mongodb doc
but when this
db.system.js.save({ _id : "myaddfunction" , value : function (x, y){ return x + y; }});
and this
db.loadserverscripts(); myaddfunction(3,5);
i have error
{ "message" : "myaddfunction not defined", "stack" : "script:3:1" }
do have idea why can not load function ?
thank in advance , sorry in advance english not good
Comments
Post a Comment