Author: russellm
Date: 2010-05-08 23:24:21 -0500 (Sat, 08 May 2010)
New Revision: 13145
Modified:
django/trunk/docs/ref/models/querysets.txt
Log:
Fixed #13455 -- Clarified the interaction of values() and extra(). Thanks to
Rupe for the report and draft text.
Modified: django/trunk/docs/ref/models/querysets.txt
===================================================================
--- django/trunk/docs/ref/models/querysets.txt 2010-05-09 04:23:43 UTC (rev
13144)
+++ django/trunk/docs/ref/models/querysets.txt 2010-05-09 04:24:21 UTC (rev
13145)
@@ -418,6 +418,11 @@
* When using ``values()`` together with ``distinct()``, be aware that
ordering can affect the results. See the note in the `distinct()`_
section, above, for details.
+ * If you use a ``values()`` clause after an ``extra()`` clause,
+ any fields defined by a ``select`` argument in the ``extra()``
+ must be explicitly included in the ``values()`` clause. However,
+ if the ``extra()`` clause is used after the ``values()``, the
+ fields added by the select will be included automatically.
.. versionadded:: 1.0
@@ -1383,7 +1388,7 @@
SELECT ... WHERE id > 4;
-.. fieldlookup:: gte
+.. fieldlookup:: gte
gte
~~~
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.