10000 [Bugfix] Fix stale data on cached relationships after write operation · laravel-json-api/laravel@9ffc135 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9ffc135

Browse files
committed
[Bugfix] Fix stale data on cached relationships after write operation
See #223
1 parent bf4998c commit 9ffc135

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
All notable changes to this project will be documented in this file. This project adheres to
44
[Semantic Versioning](http://semver.org/) and [this changelog format](http://keepachangelog.com/).
55

6+
## Unreleased
7+
8+
### Fixed
9+
10+
- [#223](https://github.com/laravel-json-api/laravel/issues/223) Ensure Eloquent models always have fresh data after
11+
write operation. This is to prevent cached relationships from having "stale" data after the write operation. This can
12+
occur if a related model's attributes change during the write operation, but the related model was cached before the
13+
write operation occurred.
14+
615
## [2.5.0] - 2023-01-15
716

817
### Added

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"php": "^7.4|^8.0",
2727
"ext-json": "*",
2828
"laravel-json-api/core": "^2.4",
29-
"laravel-json-api/eloquent": "^2.2",
29+
"laravel-json-api/eloquent": "^2.2.1",
3030
"laravel-json-api/encoder-neomerx": "^2.0.1",
3131
"laravel-json-api/exceptions": "^1.1.1",
3232
"laravel-json-api/spec": "^1.2",
@@ -65,7 +65,7 @@
6565
]
6666
}
6767
},
68-
"minimum-stability": "stable",
68+
"minimum-stability": "dev",
6969
"prefer-stable": true,
7070
"config": {
7171
"sort-packages": true

0 commit comments

Comments
 (0)
0