You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {string|function} [options.ref] if `ref` is not nullish, this becomes a [populated virtual](/docs/populate.html#populate-virtuals)
17
-
* @param {string|function} [options.localField] the local field to populate on if this is a populated virtual.
18
-
* @param {string|function} [options.foreignField] the foreign field to populate on if this is a populated virtual.
19
-
* @param {boolean} [options.justOne=false] by default, a populated virtual is an array. If you set `justOne`, the populated virtual will be a single doc or `null`.
20
-
* @param {boolean} [options.getters=false] if you set this to `true`, Mongoose will call any custom getters you defined on this virtual
21
-
* @param {boolean} [options.count=false] if you set this to `true`, `populate()` will set this virtual to the number of populated documents, as opposed to the documents themselves, using [`Query#countDocuments()`](./api.html#query_Query-countDocuments)
16
+
* @param {String|Function} [options.ref] if `ref` is not nullish, this becomes a [populated virtual](/docs/populate.html#populate-virtuals)
17
+
* @param {String|Function} [options.localField] the local field to populate on if this is a populated virtual.
18
+
* @param {String|Function} [options.foreignField] the foreign field to populate on if this is a populated virtual.
19
+
* @param {Boolean} [options.justOne=false] by default, a populated virtual is an array. If you set `justOne`, the populated virtual will be a single doc or `null`.
20
+
* @param {Boolean} [options.getters=false] if you set this to `true`, Mongoose will call any custom getters you defined on this virtual
21
+
* @param {Boolean} [options.count=false] if you set this to `true`, `populate()` will set this virtual to the number of populated documents, as opposed to the documents themselves, using [`Query#countDocuments()`](./api.html#query_Query-countDocuments)
22
22
* @param {Object|Function} [options.match=null] add an extra match condition to `populate()`
23
23
* @param {Number} [options.limit=null] add a default `limit` to the `populate()` query
24
24
* @param {Number} [options.skip=null] add a default `skip` to the `populate()` query
25
25
* @param {Number} [options.perDocumentLimit=null] For legacy reasons, `limit` with `populate()` may give incorrect results because it only executes a single query for every document being populated. If you set `perDocumentLimit`, Mongoose will ensure correct `limit` per document by executing a separate query for each document to `populate()`. For example, `.find().populate({ path: 'test', perDocumentLimit: 2 })` will execute 2 additional queries if `.find()` returns 2 documents.
26
26
* @param {Object} [options.options=null] Additional options like `limit` and `lean`.
27
-
* @param {string} name
27
+
* @param {String} name
28
28
* @api public
29
29
*/
30
30
@@ -36,10 +36,8 @@ function VirtualType(options, name) {
0 commit comments