Unable to edit document if field _id is not ObjectId
See original GitHub issueOption Edit
in context menu is inactive when trying to edit document with non ObjectId() value in _id
field
Environment:
- Ubuntu 18.04.1
- Intellij IDEA 2018.2.1
- Mongo plugin 0.12.0
- MongoDB server 4.0
Steps:
- prepare MongoDB server
- add testing server to IDEA
- prepare data for the test with the following commands:
- > use somedb
- > db.somecollection.insert({_id: “some-identifier0”, foo: “foo”, bar: “beer”})
- > db.somecollection.insert({foo: “some-foo”, bar: “tequila”})
- open test DB in IDEA
- try to edit first and second documents
Actual result:
document with non-ObjectId() _id
field could not be editable
Expected result:
user can edit all documents in DB using context menu and Edit
option
Attachments: Video on Youtube
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
MongoDB can't update document because _id is string, not ...
1 Answer 1 ... Because you can't modify the _id field, a better approach is to simply remove the that field from your...
Read more >Why can't I change the _id field? #Studio3T_AMA | Studio 3T
As the _id field is immutable, you cannot change it and that's by design. This field is all about being the immovable reference...
Read more >ArcMap says there is no Object-ID field, but there is, even after ...
When I add a .csv file, Display XY Data, I get an error that there is no Object-ID field (even though there is)....
Read more >Warning: Data source does not have an OID field
Solution: Export the table or layer to a new table or feature class. More information: An ObjectID field is required to edit a...
Read more >Failed to save document without define an _id in his model
The _id is generated with an objectId by default, even when not defining that field. You can change the field by defining it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any plans to fix/support this feature?
I think, in 90% cases
ObjectId
is used, but_id
may be of any type other than an array. mongodb docs