Changes between Version 3 and Version 7 of Ticket #28560


Ignore:
Timestamp:
09/10/2017 07:42:15 AM (2 years ago)
Author:
felixxm
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28560 – Description

    v3 v7  
    1 I think we should raise `NotSupportedError` when `distinct()` is used with `values()` (or `values_list()`) on ordered queryset and a list of fields in `values()` doesn't contain all fields from `ORDER BY`. It cannot return correct result because columns from `ORDER BY` clause must be included in `SELECT`.
     1When `distinct()` is used with `values()` (or `values_list()`) on ordered queryset and a list of fields in `values()` doesn't contain all fields from `ORDER BY`, then it doesn't return correct result because columns from `ORDER BY` clause must be included in `SELECT`. As Simon suggested we should wrap a query in a subquery.
Back to Top