Changes between Version 2 and Version 4 of Ticket #27332


Ignore:
Timestamp:
Oct 10, 2016, 5:02:14 PM (8 years ago)
Author:
MikiSoft
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27332

    • Property Type UncategorizedNew feature
  • Ticket #27332 – Description

    v2 v4  
    11For example, this raw SQL:
    22{{{
     3#!sql
    34SELECT event.*
    45FROM event
     
    1516
    1617{{{
    17 from django.db.models import Q
    18 from django.db.models.functions import Coalesce
    19 
     18#!python
    2019Event.objects.filter(Q(pk__in=Like.objects.filter(person_id=1, content_type_id=17).prefetch_related('content_object').values_list('object_id', flat=True)) | Q(business__manager_id=1)).order_by(Coalesce('likes__date', 'when').desc())
    2120}}}
Back to Top