QuerySet values method fails
— at Version 2
class SomeModel(models.Model):
field1 = models.CharField(max_length=100, blank=True, null=True, default='')
field2 = models.CharField(max_length=100, blank=True, null=True, default='')
field3 = models.CharField(max_length=100, blank=True, null=True, default='')
class Meta:
db_table = 'some_model'
ordering = ['field1'] # Caused by this line
#
# SomeModel.objects.values('field1') # sql: select field1, field2, field3, from some_model
#
Change History
(2)
Resolution: |
→ worksforme
|
Status: |
new → closed
|
Description: |
modified (diff)
|
I can't reproduce this on 1.4. This is the used test case:
https://github.com/akaariai/django/commit/fa76c9ee0d9847ea357b8b1be7f3c786255713f5
And here is the generated SQL
which looks correct to me.