#31426: Can't use uuid for order_by
-------------------------------------+-------------------------------------
     Reporter:  Maxim                |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  ORDER_PATTERN,       |             Triage Stage:  Accepted
  order_by                           |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * has_patch:  1 => 0
 * version:  2.2 => master
 * type:  New feature => Bug
 * easy:  1 => 0
 * stage:  Unreviewed => Accepted


Comment:

 `ORDER_PATTERN` is a long standing hack that was added more than 12 years
 ago during the first iteration of the ORM and augmented later on to
 address #7098.

 It should be replaced by proper field reference validation but could you
 go into more details about you triggered this error? How did you manage to
 annotate a field containing an hyphen and pass it along to `order_by`.
 Just to make it clear, `order_by(str(uuid.uuid4())` is effectively not
 allowed.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31426#comment:1>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.49869195d03deaaa74b2cf6edf21020f%40djangoproject.com.

Reply via email to