Cleanup
This commit is contained in:
25
node_modules/mongoose/lib/options/SchemaObjectIdOptions.js
generated
vendored
25
node_modules/mongoose/lib/options/SchemaObjectIdOptions.js
generated
vendored
@@ -31,6 +31,31 @@ const opts = require('./propertyOptions');
|
||||
|
||||
Object.defineProperty(SchemaObjectIdOptions.prototype, 'auto', opts);
|
||||
|
||||
/**
|
||||
* Sets default [populate options](/docs/populate.html#query-conditions).
|
||||
*
|
||||
* ####Example:
|
||||
* const schema = new Schema({
|
||||
* child: {
|
||||
* type: 'ObjectId',
|
||||
* ref: 'Child',
|
||||
* populate: { select: 'name' }
|
||||
* }
|
||||
* });
|
||||
* const Parent = mongoose.model('Parent', schema);
|
||||
*
|
||||
* // Automatically adds `.select('name')`
|
||||
* Parent.findOne().populate('child');
|
||||
*
|
||||
* @api public
|
||||
* @property populate
|
||||
* @memberOf SchemaObjectIdOptions
|
||||
* @type Object
|
||||
* @instance
|
||||
*/
|
||||
|
||||
Object.defineProperty(SchemaObjectIdOptions.prototype, 'populate', opts);
|
||||
|
||||
/*!
|
||||
* ignore
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user