Why new documents in mongo have an object and not an ObjectId?

前端 未结 3 2060
青春惊慌失措
青春惊慌失措 2021-01-18 17:08

When inserting new documents in mongodb, ids don\'t look like ObjectId and instead they look like an object.

\"_id\" : {
        \"_bsontype\" : \"ObjectID\"         


        
3条回答
  •  心在旅途
    2021-01-18 17:57

    The malformed ObjectIds are caused by a conflict with the mongoose version that mongoose-q is using. You'll need to update to mongoose-q to version 0.1.0. I was using 0.0.17 previously and saw exactly the same behavior that you saw here.

提交回复
热议问题