Before opening a ticket I thought I would check what the expected
behavior is for generative values().  This is the behavior I'm seeing
on Queryset Refactor branch and to me it seems like it is not the
correct behavior.

>>> from original.foo.models import Category
>>> Category.objects.all()
[<Category: Algol>, <Category: Smalltalk>, <Category: PHP>, <Category:
CSharp>]
>>> Category.objects.values('name')
[{'name': u'Algol'}, {'name': u'Smalltalk'}, {'name': u'PHP'},
{'name': u'CSharp'}]
>>> Category.objects.values('name', 'id')
[{'name': u'Algol', 'id': 1}, {'name': u'Smalltalk', 'id': 2},
{'name': u'PHP', 'id': 3}, {'name': u'CSharp', 'id': 4}]
>>> Category.objects.values('name').values('id')
[{'name': u'Algol'}, {'name': u'Smalltalk'}, {'name': u'PHP'},
{'name': u'CSharp'}]

It would seem to me that the last query should return the same thing
as the prior one.

Michael Trier
blog.michaeltrier.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to