Skip to content

Fix stale state on Eloquent models after write operation

Compare
Choose a tag to compare
@lindyhopchris lindyhopchris released this 23 Jan 18:10
· 87 commits to develop since this release

Upgrading

composer require laravel-json-api/laravel --no-update
composer up "laravel-json-api/*"

Changelog

Fixed

  • #223 Ensure Eloquent models always have fresh data after write operation. This is to prevent cached relationships from having "stale" data after the write operation. This can occur if a related model's attributes change during the write operation, but the related model was cached before the write operation occurred.