#20708: QuerySet.update() ignores order_by() clause
-------------------------------------+-------------------------------------
     Reporter:  jrief                |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  1.7
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by slachinger):

 * cc: slachinger (added)
 * status:  closed => new
 * version:  1.5 => 1.7
 * resolution:  needsinfo =>


Comment:

 More compelling arguments:

 * An ORM should shield the user from the quirks of each DBMS, making it
 transparent from the underlying DBMS. In this case the Django ORM fails
 miserably to do so. And this is just addressing the issue that mysql
 checks constraints mid-statement.

 * Adressing the actual bug report: the order_by() should be hould be
 honored by the update command. If the developer using the ORM explicitly
 requests ORM to use order_by it should not just silently ignore that.

 Just ran into a very similar issue as the OP describes and by having to
 revert to raw SQL the benefit of using an ORM is gone.

--
Ticket URL: <https://code.djangoproject.com/ticket/20708#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/063.1b878d88c13ff63bed133f5dd2ecb976%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to