-
Notifications
You must be signed in to change notification settings - Fork 109
Traverse references #133
Comments
Hi, I was thinking about document navigation and it could be a cool feature. Perhaps we could work together on refining the use case. What do you think about it? |
Well when I very first even heard about MongoDB and saw that it worked on this Ref basis, my very first thought was that the point of this would be that you could easily traverse documents in both when coding and when just viewing the DB in a GUI client. It's already possible to traverse the documents since I'm using Doctrine ODM for PHP; however if I just wanted to look around the documents when viewing the database, I'm unable to in most GUI MongoDB clients including this one. A common use case I would have is that I have a collection of countries in the database (with a code, currency and name), and I have another collection of users. Each user can have a country associated with them. Now when reading the users collection in the database, sometimes I need to know which country that user is in. Unfortunately if I wanted to see what country the user is in, I have to manually copy the Ref ID, go to the countries table, find that ID, and then read it. |
Here is an existing GUI client that gives you the possibility of viewing the target documents of references |
Hi, A schema is recommended to make the navigation work. Do you have any info on how it could be introduced in MongoDB? |
@dboissier it's just a standard in MongoDB that these Refs in that format mean references to those documents. Internally there's nothing for this implementation-wise in MongoDB. You already have all the data necessary to be able to do traversing. Any object containing the two mandatory properties of the DBRef standard can act as a ref: https://docs.mongodb.org/v3.0/reference/database-references/#format |
Thanks for this info. Actually, I never used this feature, so this is why I asked you ;) |
Hi, In the new 0.10.0-SNAPSHOT available in the home page of the project, you can view the referenced document in a Dialog. Please tell me if it is fine or some improvement would be needed. Thanks. |
There is an exception I keep getting when viewing one of the references:
I also got this:
But there's another reference which did work. By the way amazing job with this so far, this is going to be tremendously helpful! |
Hi, I think about to keep the navigation within the view but I wanted to build something simple before going through it. I fixed the first issue but the second is related to the DBRef. How is it structured? |
The latest SNAPSHOT fixed the second issue with the DBRef |
Would it be possible to allow being redirected to the target document if a value is a reference?
It would be so useful.
Apologies if there's already a way and I just didn't know; but when right clicking a reference value, the only option the context menu gives me is "Copy".
The text was updated successfully, but these errors were encountered: