Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #13455 -- Clarified the interaction of values() and extra(). Th…

…anks to Rupe for the report and draft text.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13145 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit e7e46d1f4b08665df5a073a840b4cdc795952c7c 1 parent 663d178
Russell Keith-Magee authored May 09, 2010

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. 7  docs/ref/models/querysets.txt
7  docs/ref/models/querysets.txt
@@ -418,6 +418,11 @@ A couple of subtleties that are worth mentioning:
418 418
     * When using ``values()`` together with ``distinct()``, be aware that
419 419
       ordering can affect the results. See the note in the `distinct()`_
420 420
       section, above, for details.
  421
+    * If you use a ``values()`` clause after an ``extra()`` clause,
  422
+      any fields defined by a ``select`` argument in the ``extra()``
  423
+      must be explicitly included in the ``values()`` clause. However,
  424
+      if the ``extra()`` clause is used after the ``values()``, the
  425
+      fields added by the select will be included automatically.
421 426
 
422 427
 .. versionadded:: 1.0
423 428
 
@@ -1383,7 +1388,7 @@ SQL equivalent::
1383 1388
 
1384 1389
     SELECT ... WHERE id > 4;
1385 1390
 
1386  
-.. fieldlookup:: gte 
  1391
+.. fieldlookup:: gte
1387 1392
 
1388 1393
 gte
1389 1394
 ~~~

0 notes on commit e7e46d1

Please sign in to comment.
Something went wrong with that request. Please try again.