#29076: Make Model.refresh_from_db() clear cached foreign key and one to one
fields, even if the related ID hasn't changed
-------------------------------------+-------------------------------------
     Reporter:  Jon Dufresne         |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Jon Dufresne):

 I read through the ticket, PR, and mailing list discussion. I didn't see
 anything that explicitly decided against this behavior, but please let me
 know if I missed it. I agree that it was probably done this way as an
 attempt at a performance optimization. That said, I think my proposed
 change will still lead to less confusion when using `.refresh_from_db()`
 as well as more consistent handling of different field types.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29076#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.77de162a9ca0948da69c8c9652bedb12%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to