8000 Bug: First and last collection results has the same _id · Issue #167 · officert/mongotron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Bug: First and last collection results has the same _id #167
Open
@armand1m

Description

@armand1m

Hi, first of all, thanks for developing Mongotron. Has made my learning curve way easier to work with MongoDB.

However, I've noticed this problem in the version 1.0.0-alpha.5 when running on macOS and xUbuntu:

This is the result from a db.users.find({}) simple query that returns 2 documents:

captura de tela 2017-10-01 as 14 40 39

If you see, the Id being displayed for the 2 documents are the same. If you look at the _id property of each document, you can know from what document this repeated id belong:

captura de tela 2017-10-01 as 14 40 44

captura de tela 2017-10-01 as 14 40 51

Apparently the last document is its owner. I've tried querying other collections with more documents, and saw that the first item Id is always being the same as the last document from the result:

captura de tela 2017-10-01 as 14 40 23

The problem with this is that, when you use the edit button to edit the first document, the changes applied go to the last document, because of this id mismatch. So in order to update the first document, you need to copy the id and write an updateById (also remind to fix the last change that was a mistake).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0