Provide ObjectId getter

master
garrettmills 4 years ago
parent 5e598afcc6
commit 202d4259f4
No known key found for this signature in database
GPG Key ID: 6ACD58D6ADACFC6E

@ -55,6 +55,15 @@ class Model extends Injectable {
return new Schema(this.schema)
}
/**
* Get the MongoDB ObjectId class.
* @returns {mongodb/ObjectId}
* @constructor
*/
static get ObjectId() {
return ObjectId
}
/**
* Optionally, the name of the collection where this model should
* have its records stored. If none is provided, the collection will be the

Loading…
Cancel
Save