-
Notifications
You must be signed in to change notification settings - Fork 257
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
What happened to ObjectId? #41
Comments
should work
|
Awesome, that worked. This is kind of strange, though. I played around with the objects trying to find |
Okay, that looks like it completely resolved the issue. Thank you for all of your help! |
Woops, looks like I spoke too soon. In the latest version of mongojs, I am getting this error, coming from
This was just working, but I must have been running an outdated, but working version of mongojs. Very frustrating! I am using the code that was suggested above, and this exception happens when I attempt to call the |
This is resolved by changing line return new mongodb.ObjectID(id); I just made this change locally, and I can create a pull request if necessary, but it would probably just be easier for someone with direct access to change it. |
Thank you! This fix was released in 0.6.3. var mongojs = require('mongojs');
var oid = mongojs.ObjectId(...); |
Using mongojs.ObjectId() there is any chance to get a duplicated id? |
Maybe I'm just missing something, but I typically converted a
string
into anObjectId
with the following code:This is no longer defined. Was this moved? Is there a better way to do this that I'm missing? I'm assuming this probably isn't a bug, but I wanted to post it here to ideally get help, or alert you to the fact that this no longer works (if it should).
The text was updated successfully, but these errors were encountered: