I would like to paste a Mongo ObjectId and it automatically query on it
I would like to paste a Mongo ObjectId and it automatically query on it.
Right now when I go to type something into the query filter field it'll automatically add {}
A great next step is if I [ctrl} + [v] paste in a MongoDB ID, then it automatically turns it into an _id query.
Step 1: Copy "64f046fb304cee6fa007d935"
Step 2: Paste int othe filter (Query) field
Step 2b: MongoDB compass converts my text into the query {_id: ObjectId('64f046fb304cee6fa007d935')}
Step 3: Click [Find] (or maybe it can even automatically do that?
Currently I have to type"
_id: ObjectId('<now paste in the objectId>')
This is something many people do very often. So whilst it's only a small step, it would nicely improve productivity.
You should be able to detect an ObjectId being pasted (or manually typed?).
-
Jason Lowder commented
I don't know if something in the ObjectId states what collection it is in, but often times I have to do some digging to see which collection dev is referencing by a returned ID. Having it pull up the data without stating which collection it is in would also be a nice feature.
-
Michael Kubler commented
I would still love to see this.
Given I can click in the Query field and I'll have {} automatically added, this should be doable.