Robomongo: functions cannot save

Created on 19 Jul 2017  路  6Comments  路  Source: Studio3T/robomongo

When I press the _Save_ button, the _edit function_ window closes but the _function document_ has not changed.

Mongo 3.4.4
Robo 3T 1.1.1
Windows 10 Enterprise

Most helpful comment

I have same issue.
function didn't save to db.system.js

Mongo 3.4.7
Robo 3T 1.1.1
Mac OS X

All 6 comments

how to connect robomongo in live server

I have same issue.
function didn't save to db.system.js

Mongo 3.4.7
Robo 3T 1.1.1
Mac OS X

I also have this issue.

same issue

robo 3t 1.2
ubuntu

Same issue.
Xubuntu
Robo3T 1.2

function () {
    db.getCollection("collectionA").remove({});
}

The above function will save, the following will not save nor overwrite an existing function:

function () {
    db.getCollection("collectionA").remove({});
    db.getCollection("collectionB").remove({});
}

It appears functions with more that 1 command fail to save?


Workaround

It is possible to work around the issue for now by manually adding the function via JS:

db.system.js.save({
   _id : "myFunc",
   value : function() { 
    db.getCollection("collectionA").remove({});
    db.getCollection("collectionB").remove({});
   }
});

The above works without an issue.

Same issue, my gosh fix this already the workaround is annoying.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fabritw picture fabritw  路  3Comments

ghost picture ghost  路  3Comments

OmisNomis picture OmisNomis  路  3Comments

mayask picture mayask  路  3Comments

andidev picture andidev  路  3Comments