Giter Club home page Giter Club logo

Comments (5)

mafintosh avatar mafintosh commented on May 24, 2024

Yes - mongojs currently casts all _id properties as ObjectIds.

I'm willing to change this to support the use-case you describe and expose a explicit ObjectId wrapper or something if you want to use that.

from mongojs.

sean-lynch avatar sean-lynch commented on May 24, 2024

That's certainly something I'd use if it was changed. The workaround is to maintain a separate id field in each model and replace any .save() calls with .update({id:object.id}, object, {upsert:true}) which works but is a lot more complex than it could be.

Thanks very much for mongojs. I really appreciate the effort to stick with the shell API

On Sep 22, 2011, at 6:16 AM, Mathias [email protected] wrote:

Yes - mongojs currently casts all _id properties as ObjectIds.

I'm willing to change this to support the use-case you describe and expose a explicit ObjectId wrapper or something if you want to use that.

Reply to this email directly or view it on GitHub:
#5 (comment)

from mongojs.

mafintosh avatar mafintosh commented on May 24, 2024

Should be fixed in f703899. Let me know if it works.

from mongojs.

sean-lynch avatar sean-lynch commented on May 24, 2024

It works perfectly, thank you very much!

from mongojs.

sean-lynch avatar sean-lynch commented on May 24, 2024

This is indeed fixed, thank you very much!

On Fri, Sep 23, 2011 at 3:59 AM, Mathias Buus <
[email protected]>wrote:

Should be fixed in f703899.
Let me know if it works.

Reply to this email directly or view it on GitHub:
#5 (comment)

from mongojs.

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.