On update of a model, if the foreignId changed (IE, comment moved to different post) the aggregateCache would be updated on the new foreign model, but the cache would remain untouched on the old model, leaving the cache out of sync. This update looks for changes in the foreignId and if detected calls __updateCache on both old and new models, keeping everything in sync.
On update of a model, if the foreignId changed (IE, comment moved to different post) the aggregateCache would be updated on the new foreign model, but the cache would remain untouched on the old model, leaving the cache out of sync. This update looks for changes in the foreignId and if detected calls __updateCache on both old and new models, keeping everything in sync.