#16211: using negated F()-expression in update query
-------------------------------------+-------------------------------------
     Reporter:  wdoekes              |                    Owner:  nobody
         Type:  New feature          |                   Status:  new
    Component:  Database layer       |                  Version:  1.4
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  1
    Has patch:  1                    |  Patch needs improvement:  0
  Needs tests:  1                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by anonymous):

 If you have overridden all of the other operators, people will expect the
 `==` and `!=` to work the same. If you specify .eq or .neq, then someone
 is going to write `.update(field = F('predicate') == F('value') )` and it
 will set False every time.

 The best way to tell if it will conflict with internal django comparisons
 is to patch it into trunk and run all the tests. If the tests pass, it's
 all good.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16211#comment:13>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to