Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mongo ids displayed in the tree give no information #381

Closed
ejizba opened this issue Mar 5, 2018 · 3 comments
Closed

Mongo ids displayed in the tree give no information #381

ejizba opened this issue Mar 5, 2018 · 3 comments
Assignees
Labels
bug The issue reveals something not working as expected. mongo P2
Milestone

Comments

@ejizba
Copy link
Contributor

ejizba commented Mar 5, 2018

Today the user sees a bunch of ids like this:
screen shot 2018-03-05 at 8 59 16 am

But those aren't helpful at all. I see a few ways to fix (which are not mutually exclusive):

  1. Create a setting so that users can specify the property to display in the tree
  2. When the user creates a new document, use the value they enter for the id as the "_id" property instead of "id". If I create a document with id specified as "exampleid", this is what I get:
{
  "_id": "5a9d7668dcb45709671aa200",
  "id": "exampleId"
}

We could be using "_id" - I know its possible since I can run this command successfully:

db.scores.insertOne{
    "_id": "exampleId"
})
@ejizba ejizba added bug The issue reveals something not working as expected. P2 mongo labels Mar 5, 2018
@StephenWeatherford StephenWeatherford added this to the 0.7.0 milestone Apr 12, 2018
@StephenWeatherford
Copy link
Contributor

Show id if available.

@vyashole
Copy link

Ideally, this could be made configurable per collection.
For example, one might want to see name or username for a users collection or something like a slug for a posts collections instead of _id.

@StephenWeatherford
Copy link
Contributor

@adwaitv Does it need to be configurable per collection (which makes for more complicated settings), or would a simple array of ordered properties work well enough, e.g.:

"cosmosdb.docdb.displayproperties": ["slug", "username", "name", "id", "_id"]

where the first property that exists on each document is the one that is displayed? Thanks.

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug The issue reveals something not working as expected. mongo P2
Projects
None yet
Development

No branches or pull requests

4 participants