Robomongo: Data loss when find and edit by part of fields!

Created on 6 Feb 2017  ·  6Comments  ·  Source: Studio3T/robomongo

Steps to reproduce:

  • open collection view
  • change query to retrieve only part of fields (see example for users collection)
db.getCollection('users').find({}, {username: 1})
  • select one document and click Edit document
  • edit values and press Save

    Actual:

document contain only these few fields that were filtered

Expected:

document will contain all previous fields with new changes (no fields lost)

version: robomongo-0.9.0-windows-x86_64-0786489
bug critical-dataloss

Most helpful comment

Any progress here?

All 6 comments

Yes that's a problem.
Another (related I think) issue that is maybe not technically a bug but is very dangerous:

The update action creates the following template

db.getCollection('debug_log').update(
    // query 
    {
        "key" : "value"
    },

    // update 
    {
    },

    // options 
    {
        "multi" : false,  // update only one document 
        "upsert" : false  // insert a new document, if no existing document match the query 
    }
);

It would be much better if the template was instead:

    // update 
    $set: {
    },

In general IMO you expect to only change the fields you're listing without erasing the other fields.

Hi All,
thanks for reporting! We are very sorry for that issue! It's known one (https://github.com/paralect/robomongo/issues/1093).
We will consider fix for this issue in next releases.

+1

No news ? I consider this as Major.

Hi @Aquazus , this is duplicate and the original issue was already labeled as major and I just labeled it as 'critical' which is more important label since there is data loss: https://github.com/Studio3T/robomongo/issues/1093. (I did label this issue as critical too).

This issue has been and will be considered for next releases. It is actively discussed.
Thanks for your interest.

Any progress here?

Was this page helpful?
0 / 5 - 0 ratings