5 Documents can be retrieved through `find`, `findOne` and `findById`. These
6 methods are executed on your `Model`s.
10 Model.find(query, fields, options, callback)
12 // fields and options can be ommitted
16 Model.find({ 'some.value': 5 }, function(err, docs){
20 ### Retrieveing only certain fields
22 Model.find({}, ['first', 'last'], function (err, docs){
23 // docs is an array of partially-`init`d documents
28 Same as `Model#find`, but only receives a single document as second parameter:
30 Model.findOne({ age: 5}, function (err, doc){
36 Same as `findById`, but receives a value to search a document by their `_id`
37 key. This value is subject to casting, so it can be a hex string or a proper
42 Model.count(query, callback)
46 Each of these methods returns a Query. If you don't pass a callback to these
47 methods, the Query can be continued to be modified (such as adding options,
48 fields, etc), before it's `exec`d.
50 var query = Model.find({});
52 query.where('field', 5);
56 // query.executed == false
58 query.exec (function (err, docs) {
59 // called when the `query.complete` or `query.error` are called
63 // query.executed == true