#19726: Ordering on booleans works different with SQLite and Postgres
-------------------------------------+-------------------------------------
     Reporter:  anonymous            |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Database layer       |                  Version:  master
  (models, ORM)                      |
     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
-------------------------------------+-------------------------------------
Changes (by jarshwah):

 * cc: josh.smeaton@… (added)
 * status:  closed => new
 * version:  1.4 => master
 * resolution:  wontfix =>
 * stage:  Unreviewed => Accepted


Comment:

 Reopening based on some discussion here:
 https://groups.google.com/forum/#!topic/django-developers/h5ok_KeXYW4

 Basically, order_by needs to support __lookup syntax via F() support for
 __lookup syntax. That ticket is tracked here
 https://code.djangoproject.com/ticket/24747.

 Once that is done, we can add a transform to boolean field that can be
 used for consistent ordering. A transform can be added now and used
 directly in the order_by:

 {{{
 class ConsistentOrdering(Transform):
     # implementation

 Transaction.objects.order_by(ConsistentOrdering('submitted').desc())
 }}}

 But I don't think we should close this ticket until both the transform are
 created and order_by can leverage __lookup syntax.

--
Ticket URL: <https://code.djangoproject.com/ticket/19726#comment:5>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.8c88f99bfedebe6059c50b44744532fa%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to