This was working fine until I tried to query an ingredient by its id in minimongo:
ingredient = Ingredients.findOne(ingredientId); // this returns undefined ingredient = Ingredients.findOne({ '_id': ingredientId }); // so does this
So frustrating that the intuitive thing fails and I have no idea why. After reading some more posts I found that by default meteor uses a different function, namely Random.id(), to generate identifiers. After I changed to use this, the queries started to work.
I don't know what is Meteor.Collection.ObjectID() for. And at this point I don't much care, like my old team used to say "we only move forward".
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.