-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
backwards-breakingenhancementThis issue is a user-facing general improvement that doesn't fix a bug or add a new featureThis issue is a user-facing general improvement that doesn't fix a bug or add a new feature
Milestone
Description
Might be handy:
$ node
> const mongoose = require('mongoose')
undefined
> mongoose.Types.ObjectId.prototype.valueOf = function() { return this.toString() }
[Function]
> let id = new mongoose.Types.ObjectId()
undefined
> let id2 = new mongoose.Types.ObjectId(id.toString())
undefined
> id.valueOf()
'5c06e90e9f9d0a288edccbc6'
> id2.valueOf()
'5c06e90e9f9d0a288edccbc6'
> id === id2.toString()
false
> id == id2.toString()
truesibelius, jgcmarins, download13 and jtag05
Metadata
Metadata
Assignees
Labels
backwards-breakingenhancementThis issue is a user-facing general improvement that doesn't fix a bug or add a new featureThis issue is a user-facing general improvement that doesn't fix a bug or add a new feature