Changes between Initial Version and Version 1 of Ticket #28856, comment 4
- Timestamp:
- Nov 28, 2017, 7:26:38 PM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #28856, comment 4
initial v1 1 1 Thanks for looking at this Simon. 2 2 3 I should've been a bit clearer about the problem: on the instance return from `refresh_from_db`, *every access of the GFK attribute* produces a *different instance* of the related object. (I tried to show that with the `id(ref.obj) == id(ref.obj)` line).3 I should've been a bit clearer about the problem: on the instance returned from `refresh_from_db`, **every access of the GFK attribute** produces a **different instance** of the related object. (I tried to show that with the `id(ref.obj) == id(ref.obj)` line). 4 4 5 5 I called `refresh_from_db` just to simulate a real-world situation where the row backing the `ref` instance here is created at some point, and at some later point a new model instance is instantiated for that row.