mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
9ede5905f6
refs #6103 - simplify `toJSON` - `baseKey` was not used - have not find a single use case - all the functionality of our `toJSON` is offered in bookshelf - `omitPivot` does remove pivot elements from the JSON obj (bookshelf feature) - `shallow` allows you to not return relations - make use of `serialize`, see http://bookshelfjs.org/docs/src_base_model.js.html#line260 - fetching nested relations e.g. `users.roles` still works (unrelated to this refactoring) > pick('shallow', 'baseKey', 'include', 'context') We will re-add options validation in https://github.com/TryGhost/Ghost/pull/9427, but then with the official way: use `filterOptions`. --- We return all fetched relations (pre-defined with `withRelated`) by default. You can disable it with `shallow:true`. |
||
---|---|---|
.. | ||
collision.js | ||
filter.js | ||
include-count.js | ||
index.js | ||
pagination.js |