Merge pull request #764 from eugene-frb/master

Capture includeHasMany() as a find()'s caller by findCaller option
This commit is contained in:
Raymond Feng 2015-11-26 09:29:14 -08:00
commit 3a3cb5b7cb
1 changed files with 1 additions and 0 deletions

View File

@ -542,6 +542,7 @@ Inclusion.include = function (objects, include, options, cb) {
inq: uniq(sourceIds)
};
relation.applyScope(null, filter);
options.partitionBy = relation.keyTo;
relation.modelTo.find(filter, options, targetFetchHandler);
/**
* Process fetched related objects