Skip to content

Commit

Permalink
Added some jsdoc.
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoguchi committed Feb 14, 2011
1 parent 346de96 commit c6f03d4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/mongoose/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ Query.prototype.find = function (criteria, callback) {
return this.execFind(callback);
};

/**
* Casts obj, or if obj is not present, then this._conditions,
* based on the model's schema.
*
* @param {Function} model
* @param {Object} obj (optional)
* @api public
*/

Query.prototype.cast = function (model, obj) {
obj || (obj= this._conditions);

Expand Down

0 comments on commit c6f03d4

Please sign in to comment.