list=Model1.objects.filter(
             reservation__in=Model.objects.filter(resource__in=resources).union(
            Model2.objects.filter(
     
reservation__in=Model.object.filter(resource__in=resources).defer('col4','col5','col6'),
 
             Model3.objects.filter(
                 reservation__in=Model.objects.filter(resource__in=resources),\
            Model4.objects.filter(
                 
reservation__in=Model.objects.filter(resource__in=resources).defer('col4')


I am trying to resturn this queryset in get_initial_queryset in datatable.But 
getting an error 

raise DatabaseError('ORDER BY term does not match any column in the result 
set.') 
<https://stackoverflow.com/questions/62592403/raise-databaseerrororder-by-term-does-not-match-any-column-in-the-result-set>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/454e3bec-accf-4bb5-9eb5-1a0c833a4527o%40googlegroups.com.

Reply via email to