Add more comments
This commit is contained in:
parent
2a57a909f0
commit
c008c4d30a
|
@ -544,9 +544,13 @@ DataAccessObject.find = function find(params, cb) {
|
|||
|
||||
if (params && params.include) {
|
||||
if (params.collect) {
|
||||
// Return the collected item for through models
|
||||
// The collect property indicates that the query is to return the
|
||||
// standlone items for a related model, not as child of the parent object
|
||||
// For example, article.tags
|
||||
obj = obj.__cachedRelations[params.collect];
|
||||
} else {
|
||||
// This handles the case to return parent items including the related
|
||||
// models. For example, Article.find({include: 'tags'}, ...);
|
||||
// Try to normalize the include
|
||||
var includes = params.include || [];
|
||||
if (typeof includes === 'string') {
|
||||
|
|
Loading…
Reference in New Issue