#36207: refresh_from_db() doesn't clear cached ForeignObject relations
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Jacob
| Walls
Type: Bug | Status: assigned
Component: Database layer | Version: 5.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Clifford Gama):
* stage: Accepted => Ready for checkin
Comment:
Patch LGTM
The only remaining consideration is whether adding an entry to
`FORWARD_PROPERTIES` without adding a corresponding test—despite limited
test coverage for this set—is acceptable. Since:
1. The risk appears low (no tests fail without it, but stale cache could
theoretically occur).
2. Testing this edge case robustly would likely require invasive model
mutations post-setup.
3. Field-related entries in `FORWARD_PROPERTIES` are untested (You can
remove all but one of them without seeing any test failures.
Leaving this to the merger’s discretion.
--
Ticket URL: <
https://code.djangoproject.com/ticket/36207#comment:20>