mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-18 07:51:55 +03:00
bbcc83dadb
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.
13 lines
422 B
JavaScript
13 lines
422 B
JavaScript
module.exports = {
|
|
eagerLoad: require('./eager-load'),
|
|
filter: require('./filter'),
|
|
order: require('./order'),
|
|
customQuery: require('./custom-query'),
|
|
search: require('./search'),
|
|
includeCount: require('./include-count'),
|
|
pagination: require('./pagination'),
|
|
collision: require('./collision'),
|
|
transactionEvents: require('./transaction-events'),
|
|
hasPosts: require('./has-posts')
|
|
};
|