Closed aksarben09 closed 8 years ago
Yes, unfortunately this package has no support for anything but string _id values. It was only ever designed with string _id values in mind, as that's what Meteor generally uses. There's no way to use this package with native Mongo object _id values - it would need quite a substantial refactor first.
Thank you @JackAdams for clarifying. I think I can try passing in the ObjectId
into update
by wrapping it around: {_id: doc._id}
.
Closing the issue.
I suppose the best way of using this package is to use it from the beginning. But I already have data in the database and I would like to integrate this package.
When I try to do this, in particular, to update two documents, I got an error:
The code I used to update looks like this:
When I took a closer look, I found that this package does not use
ObjectId
for_id
field but a plain string. This seems to cause the problem. What was the purpose of doing this? Is there a way that I can use this package with existing data without modifying them?