mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Merge pull request #4436 from mattiascibien/issue-4232
Do not eagerly fetch relations in when finding all posts
This commit is contained in:
commit
da095ba551
1 changed files with 3 additions and 1 deletions
|
@ -248,7 +248,9 @@ Post = ghostBookshelf.Model.extend({
|
|||
*/
|
||||
findAll: function (options) {
|
||||
options = options || {};
|
||||
options.withRelated = _.union(['tags', 'fields'], options.include);
|
||||
|
||||
// fetch relations passed to options.include
|
||||
options.withRelated = options.include;
|
||||
return ghostBookshelf.Model.findAll.call(this, options);
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue