Ticket #12678: 12678.diff
File 12678.diff, 2.4 KB (added by , 15 years ago) |
---|
-
docs/topics/db/models.txt
1081 1081 Now normal ``User`` queries will be unorderd and ``OrderedUser`` queries will 1082 1082 be ordered by ``username``. 1083 1083 1084 Query sets still return the model that was requested1084 QuerySets still return the model that was requested 1085 1085 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1086 1086 1087 1087 There is no way to have Django return, say, a ``MyUser`` object whenever you -
docs/topics/db/aggregation.txt
96 96 ================================================= 97 97 98 98 The second way to generate summary values is to generate an independent 99 summary for each object in a ``Query set``. For example, if you are retrieving99 summary for each object in a ``QuerySet``. For example, if you are retrieving 100 100 a list of books, you may want to know how many authors contributed to 101 101 each book. Each Book has a many-to-many relationship with the Author; we 102 102 want to summarize this relationship for each book in the ``QuerySet``. … … 257 257 258 258 Ordinarily, annotations are generated on a per-object basis - an annotated 259 259 ``QuerySet`` will return one result for each object in the original 260 ``Query set``. However, when a ``values()`` clause is used to constrain the260 ``QuerySet``. However, when a ``values()`` clause is used to constrain the 261 261 columns that are returned in the result set, the method for evaluating 262 262 annotations is slightly different. Instead of returning an annotated result 263 263 for each result in the original ``QuerySet``, the original results are -
docs/ref/models/querysets.txt
92 92 than the results that are currently in the database. 93 93 94 94 If you only want to pickle the necessary information to recreate the 95 ``Query set`` from the database at a later time, pickle the ``query`` attribute95 ``QuerySet`` from the database at a later time, pickle the ``query`` attribute 96 96 of the ``QuerySet``. You can then recreate the original ``QuerySet`` (without 97 97 any results loaded) using some code like this:: 98 98