Reputation: 420
I have a running Meteor application on a Fedora 18 workstation. The meteor web application appears to be functioning correctly without errors in the web console. When I try to run the following in the Web console it returns undefined.
Meteor.Collection.ObjectID()
According to the documentation and other StackOverflow answers this should work. I have used both FireFox and Chrome to test this. What am I missing?
Upvotes: 2
Views: 1285
Reputation: 368
Mongo replaced Meteor.Collection. Mongo.ObjectID follows the same API as the Node MongoDB driver ObjectID class.
var _id = new Mongo.ObjectID();
http://docs.meteor.com/#/full/mongo_object_id
Upvotes: 0
Reputation: 5578
Did you tried to create this ObjectID()
with new
?
Please try :
var _id = new Meteor.Collection.ObjectID();
console.log(_id);
Upvotes: 1