0

I am working with Mongo Compass as part of a proof of concept. I have a document that has a large object array within it I wish to edit. When I click the edit button, the cursor is sent an arbitrary line in the document, regardless of where I actually want to edit. The same behavior occurs when double-clicking on the location I wish to edit.

To mitigate this situation, I've tried querying/filtering the displayed data before editing, but Compass does not appear to allow editing of filtered data.

I am using Compass version 1.29.5 with Mongo DB version 5.0.5.

How can I better achieve document edits in this situation?

Here's an example of applying a filter/project filter that results in no edit capability:

Project filter - not editable

Here's an example where the project filter is removed and editing is allowed:

Filtered - editable

Timbuck
  • 233
  • 4
  • 13
  • could you provide a sample document? – Branchverse Jan 04 '22 at 21:01
  • So wild guess from me would be: it is due to some fields being generated and are not allowed to change, that somewhere in your schema it is set so. in Mongo Compass you have different views (right to the add data green button) when u pick the middle one `{ }` I find that you can still change those fields, but only in that view mode – Branchverse Jan 04 '22 at 21:09
  • In that view, with filtered content, I do not have the option to edit. – Timbuck Jan 04 '22 at 21:53
  • Try from this one: [Modify Documents - Compass](https://docs.mongodb.com/compass/current/documents/modify/#modify-documents). Also, tell about the version of MongoDB and Compass you are working with. – prasad_ Jan 05 '22 at 04:13
  • I've edited the question to include the version details. Editing works fine for very small documents, but I'm dealing with fairly large collections. I am working on providing a shareable example. – Timbuck Jan 05 '22 at 14:59

0 Answers0