On 1/25/06, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > If this were the case then it would be impossible to combine filter > and order_by, at least in this way: > > MyModel.objects.filter(creator__exact=5) > MyModel.objects.order_by('status') > for obj in MyModel.objects: > print obj > > For that code it seems like MyModel.objects should be a lazy > collection containing objects with creator=5 and ordered by status, > but in this case you would get an error because MyModel.objects > wouldn't support iteration.
This is different than what I'd been envisioning -- I was under the impression MyModel.objects wouldn't contain state. A manager shouldn't contain state of the filter() queries that were passed to it. (This is a good argument for treating managers differently than many-to-one and many-to-many QueryResult objects.) Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org