Skip to content

Commit ecd8242

Browse files
committed
docs(query): make note that filter param to find() can be an ObjectId re: #8268
1 parent b03faf5 commit ecd8242

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1963,7 +1963,7 @@ Model.deleteMany = function deleteMany(conditions, options, callback) {
19631963
* var promise = query.exec();
19641964
* promise.addBack(function (err, docs) {});
19651965
*
1966-
* @param {Object} filter
1966+
* @param {Object|ObjectId} filter
19671967
* @param {Object|String} [projection] optional fields to return, see [`Query.prototype.select()`](http://mongoosejs.com/docs/api.html#query_Query-select)
19681968
* @param {Object} [options] optional see [`Query.prototype.setOptions()`](http://mongoosejs.com/docs/api.html#query_Query-setOptions)
19691969
* @param {Function} [callback]

lib/query.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,7 @@ Query.prototype._find = wrapThunk(function(callback) {
19411941
* // Using callbacks
19421942
* Movie.find({ year: { $gte: 1980, $lte: 1989 } }, function(err, arr) {});
19431943
*
1944-
* @param {Object} [filter] mongodb selector. If not specified, returns all documents.
1944+
* @param {Object|ObjectId} [filter] mongodb selector. If not specified, returns all documents.
19451945
* @param {Function} [callback]
19461946
* @return {Query} this
19471947
* @api public

0 commit comments

Comments
 (0)