Ghost/core/server/models/plugins
naz bbcc83dadb
Added support for ordering Post API resources by fields coming form posts_meta table (#12226)
refs #11729

- When ordering is done by fields from a relation (like post's `meta_title` that comes form `posts_meta` table), Bookshelf does not include those relations in the original query which caused errors. To support this usecase added a mechanism to detect fields from a relation and load those relations into query. 
- Extended ordering to include table name in ordered field name.  The information about the table name is needed to avoid using `tableName` within pagination plugin and gives path to having other than original table ordering fields (e.g. order by posts_meta table fields)
- Added test case to check ordering on posts_meta fields
- Added support for "eager loading" relations. Allows to extend query builder object with joins to related tables,
which could be used in ordering (possibly in filtering later). Bookshelf does not support ordering/filtering by proprieties coming from relations, that's why this kind of plugin and query expansion is needed
- Added note about lack of support for child relations with same property names.
2020-09-24 13:32:40 +12:00
..
collision.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
custom-query.js Added ?paid query parameter to Admin API members browse endpoint (#11892) 2020-06-12 12:12:10 +01:00
eager-load.js Added support for ordering Post API resources by fields coming form posts_meta table (#12226) 2020-09-24 13:32:40 +12:00
filter.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
has-posts.js Added plugin based author and public tag models in API v2 (#10284) 2019-01-03 20:30:35 +01:00
include-count.js Updated var declarations to const/let and no lists 2020-04-29 16:51:13 +01:00
index.js Added support for ordering Post API resources by fields coming form posts_meta table (#12226) 2020-09-24 13:32:40 +12:00
order.js Added support for ordering Post API resources by fields coming form posts_meta table (#12226) 2020-09-24 13:32:40 +12:00
pagination.js Added support for ordering Post API resources by fields coming form posts_meta table (#12226) 2020-09-24 13:32:40 +12:00
search.js Added ?search= param to Admin API members endpoint (#11854) 2020-05-28 10:14:02 +01:00
transaction-events.js 🔥 Drop Node v4 Support 2018-05-01 14:06:18 +02:00