#10256: values() and values_list() either include all or no columns from the
extra(select=) clause
------------------------------------------+---------------------------------
 Reporter:  russellm                      |       Owner:  nobody    
   Status:  new                           |   Milestone:            
Component:  Database layer (models, ORM)  |     Version:  1.0       
 Keywords:                                |       Stage:  Unreviewed
Has_patch:  0                             |  
------------------------------------------+---------------------------------
 By way of example, this is what 1.0.X produces:
 {{{
 >>>
 
Book.objects.extra(select={'a':'name','b':'price','c':'pages'}).values('name','pages','a')
 [{'a': u'Book 1', 'c': 11, 'b': Decimal("11.11"), 'name': u'Book 1',
 'pages': 11}, ...

 >>>
 
Book.objects.extra(select={'a':'name','b':'price','c':'pages'}).values('name','pages')
 [{'name': u'Book 1', 'pages': 11}, ...
 }}}

 That is, if you don't explicitly mention an extra selected column in the
 values() clause, they are omitted (as expected). However, as soon as you
 include a single extra column, _all_ extra columns are included in the
 returned values.

 Analogous behavior exists for values_list().

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10256>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to