0
Fork 0
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:
Jason Williams 2014-11-17 09:36:42 -06:00
commit da095ba551

View file

@ -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);
},