mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-08 20:22:53 +03:00
2cd50d47af
We have a global hook for the bookshelf-relations plugin which updates the sort_order for pivot tables when saving the parent model. This hook requires that we fetch each row in the pivot table related to the model and then run an update on each one. Since we have a "latest" Collection this means at least N update queries where N is the number of Posts for a site. For large sites this was crippling the database. We only need the sort_order to be updated for Collections with a type of "manual". We currently don't have a way to disable the update based on model attributes, so instead we have disabled the update for all Collections - this is okay because 1. Collections is not released and 2. we don't have full support for manual Collections yet anyway. |
||
---|---|---|
.. | ||
api | ||
mock-express-style | ||
models | ||
site |