Is there a way to generate an ID for a new document?
Something like
var newID = mongoose.Types.ObjectId();
// some random code that may involve db operations.
db.Model.create({_id: newID, otherProperties: {}})
When I write something like this, actual ID of the created document is always slightly larger than the newID. Is there anyway to use the newID exactly?