Changes between Initial Version and Version 5 of Ticket #29668


Ignore:
Timestamp:
Aug 14, 2018, 6:40:55 AM (6 years ago)
Author:
Tim Graham
Comment:

Even if it's still an issue, we're no longer fixing bugs with QuerySet.extra() per discussion on django-developers.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29668

    • Property Component UncategorizedDatabase layer (models, ORM)
    • Property Cc Mariusz Felisiak added
    • Property Resolutioninvalid
    • Property Status newclosed
  • Ticket #29668 – Description

    initial v5  
    1 Turn.active_objects.all().select_related('request__address').extra(select={'start_time_tz': '(start_time AT TIME ZONE COALESCE("api_address".timezone))'}).distinct() Works but  Turn.active_objects.all().select_related('request__address').extra(select={'start_time_tz': '(start_time AT TIME ZONE COALESCE("api_address".timezone))'}).distinct().count() doesn't.
     1`Turn.active_objects.all().select_related('request__address').extra(select={'start_time_tz': '(start_time AT TIME ZONE COALESCE("api_address".timezone))'}).distinct()` Works but `Turn.active_objects.all().select_related('request__address').extra(select={'start_time_tz': '(start_time AT TIME ZONE COALESCE("api_address".timezone))'}).distinct().count()` doesn't.
    22
    33Because count executes subquery.
Back to Top