Giter Club home page Giter Club logo

Comments (5)

jeromelebel avatar jeromelebel commented on September 25, 2024

In the link, I don't see any mention about the object id case. For the string type, of course, the case is preserved. For object id type, I can't imagine the case matters since it's just binary.
In http://docs.mongodb.org/manual/core/object-id/ there is no information about the object id case.

Just to match the mongoshell behavior, I will change the object id case, when I will have time.

from mongohub-mac.

sneakywombat avatar sneakywombat commented on September 25, 2024

Correct, the link doesn't mention case, but the example was to demonstrate how some people use the hex version of that binary key in a weak, foreign key document relationship. Imagine this scenario: you double click a document to edit it and you want the hex version of that binary id. the UI and the mongo shell shows the hex version to the user, but we know it's actually a binary key. The mongo shell always shows this hex version in lower case. The UI, however, puts it into uppercase. If I wanted to copy that hex key using the UI and put it into a parent or ancestor key/val, I would need to manually change the case of each upper case letter. If I do not, any queries that match against it will fail. This is because all of the other libraries I use to interface with mongo always return the result of the object-id in lowercase. ABC != abc so to speak.

I agree that the case technically doesn't matter for the object-id, but when copying and pasting that hex value to another field that you later use as a relational value (and in the process becomes text), case does matter. If both the shell and the ui both had the same case, I wouldn't really care, but it makes it troublesome to go back and forth between the two.

Either way, I love your app and really appreciate that you've taken it over! the original author's app crashes so much it's pretty unusable.

cheers,

-j

from mongohub-mac.

jeromelebel avatar jeromelebel commented on September 25, 2024

on objective-c driver:
[master 6409303] lower case for objectid #55
1 file changed, 1 insertion(+), 1 deletion(-)

on mongohub:
[master 9fc7b57] lower case for objectid #55
1 file changed, 1 insertion(+), 1 deletion(-)
[master 9c3b51e] lower case for objectid #55
1 file changed, 1 insertion(+)

from mongohub-mac.

jeromelebel avatar jeromelebel commented on September 25, 2024

You can test it with 2.5.5 Please download this version here : https://mongohub.s3.amazonaws.com/MongoHub.zip

Please close this issue when it will work for you.

from mongohub-mac.

virl avatar virl commented on September 25, 2024

+1 to issue. Java mongo driver and morphia ORM mapper both using lowercase ObjectId.

from mongohub-mac.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.