ObjectID not storing hexadecimal value

前端 未结 1 1361
清歌不尽
清歌不尽 2021-01-23 05:18

Originally, my Sails/Mongo was storing the ObjectID in the database as follows:

\"_id\" : ObjectId(\"557077fb836bdee256004232\")

Not sure what

相关标签:
1条回答
  • 2021-01-23 05:35

    Answering my own question!

    Seemed to be something goofy happening with the brew installation of MongoDB. Manually re-installing it from http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/ and then restoring my backed up database seemed to do the trick.

    I'd still love to know from a from a code/technical standpoint why my environment suddenly decided to start returning the 12-byt BSON ObjectID rather than the Hexadecimal ObjectID... but until then hopefully a simple manual re-install will help others who come across this strange issue!

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