Ticket #13455: queryset_extra_w_values_doc.diff

File queryset_extra_w_values_doc.diff, 714 bytes (added by Joshua Russo, 15 years ago)

Added a note about the interaction between Extra(select=...) and Values()/Values_list()

  • docs/ref/models/querysets.txt

     
    710710    some database backends, such as some MySQL versions, don't support
    711711    subqueries.
    712712
     713        .. note::
     714       
     715        If using ``extra(select=...)`` with ``values()`` or ``values_list()``,
     716        the call to ``extra(select=...)`` must be before ``values()`` or
     717        ``values_list()``. Additionally, the columns specified must also
     718        be included within ``values()`` or ``values_list()``.
     719       
    713720    .. versionadded:: 1.0
    714721
    715722    In some rare cases, you might wish to pass parameters to the SQL fragments
Back to Top