#23386: Document that F expressions are reapplied each time an object is saved
--------------------------------------+------------------------------------
     Reporter:  codefisher            |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Documentation         |                  Version:  1.6
     Severity:  Normal                |               Resolution:
     Keywords:                        |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by codefisher):

 Just thinking about this, I am really more inclined to say how it works
 should be changed.  I would suggest that after save() is called, it would
 be like the object had been called with defer() on that field.  I don't
 think it would be hard to implement, I don't know the internals of the
 ORM, but defer() is already there, so what ever it does could be used
 again.

 I can't see it causing backwards compatibility changes, this is
 undocumented, and not very intuitive.  I would even suggest that after
 saving, that having the field affected by the F() expression not giving a
 sensible value is a bug in itself, and should be fixed  - by treating as
 though marked by defer().

 But there is always a change of causing backwards compatibility problems,
 that would be very hard to track down.  Which needs to be weighed against
 how many problems the current counter intuitive behaviour would cause.

--
Ticket URL: <https://code.djangoproject.com/ticket/23386#comment:4>
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/068.3169ba7e7219a106b7ff6b3e719907a0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to