2459d70048
By using the `collections_posts` table as a pivot table, I couldn't see a way to get bookshelf to *not* load the Post models for the relation. We don't actually need those Post models for our usescases, the the queries were causing issues with our database servers! Here we've added a new CollectionPost model which allows us to treat the collections_posts table as a resource ratherthan pivot, and means we can use the hasMany relation rather than belongsToMany relation. This removes all queries to the posts table when fetching collections with relations |
||
---|---|---|
.. | ||
adapter-cache-memory-ttl | ||
adapter-cache-redis | ||
adapter-manager | ||
admin | ||
announcement-bar-settings | ||
api-framework | ||
api-version-compatibility-service | ||
audience-feedback | ||
bootstrap-socket | ||
collections | ||
constants | ||
core | ||
custom-theme-settings-service | ||
data-generator | ||
domain-events | ||
donations | ||
dynamic-routing-events | ||
email-analytics-provider-mailgun | ||
email-analytics-service | ||
email-content-generator | ||
email-events | ||
email-service | ||
email-suppression-list | ||
event-aware-cache-wrapper | ||
express-dynamic-redirects | ||
external-media-inliner | ||
extract-api-key | ||
html-to-plaintext | ||
i18n | ||
importer-handler-content-files | ||
importer-revue | ||
in-memory-repository | ||
job-manager | ||
link-redirects | ||
link-replacer | ||
link-tracking | ||
magic-link | ||
mail-events | ||
mailgun-client | ||
member-attribution | ||
member-events | ||
members-api | ||
members-csv | ||
members-events-service | ||
members-importer | ||
members-ssr | ||
mentions-email-report | ||
milestones | ||
minifier | ||
model-to-domain-event-interceptor | ||
mw-api-version-mismatch | ||
mw-cache-control | ||
mw-error-handler | ||
mw-session-from-token | ||
mw-update-user-last-seen | ||
mw-version-match | ||
mw-vhost | ||
nql-filter-expansions | ||
oembed-service | ||
offers | ||
package-json | ||
payments | ||
post-events | ||
post-revisions | ||
posts-service | ||
referrers | ||
security | ||
session-service | ||
settings-path-manager | ||
slack-notifications | ||
staff-service | ||
stats-service | ||
stripe | ||
tiers | ||
update-check-service | ||
verification-trigger | ||
version-notifications-data-service | ||
webmentions | ||
tsconfig.json |