Meteor: Finding an object from a collection by _id

后端 未结 1 1948
故里飘歌
故里飘歌 2021-01-13 10:55

I am trying to find an object by _id with Meteor.

Here is what I have tried:

Meteor.publish(\"gifts\", function(gid) {
  console.log(\"Looking for \"         


        
1条回答
  •  情话喂你
    2021-01-13 11:14

    Where did you insert the document from? MongoDB treats strings and objectIds differently, and it looks like there is currently a bug in Meteor that does not handle objectIds correctly.

    https://github.com/meteor/meteor/issues/61

    0 讨论(0)
提交回复
热议问题