Hi folks, In mongo db, a ObjectId is composed by a random string hash and timestamp, converting do BSON type is an array like [Buffer, something, timestamp]. When saved to DB is converted do a hex string.
Currently I'm stuck on a problem with BSON types. <https://github.com/Automattic/mongoose/issues/8423#issue-536661765> The current _id doesn't match with retrived id from document, based on that type is converted to a ObjectId, not a literal hex string. Using methods like, toString and toHexString(on BSON type) doesn't match with current store _id string. I'm attempted recover the string using _doc methods from a find query, the two methods cited above (toString and toHexString) and (that returns a Buffer) and convert the _id string to a ObjectId that not generate a BSON Type _id. What to do in that case? -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/3b8ba4c9-55cd-4fdd-8a8a-307a8d48c5fa%40googlegroups.com.