#18324: QuerySet values method fails -------------------------------------+------------------------------------- Reporter: anonymous | Owner: nobody Type: Bug | Status: closed Component: Database layer | Version: 1.4 (models, ORM) | Resolution: Severity: Normal | worksforme Keywords: | Triage Stage: Has patch: 0 | Unreviewed Needs tests: 0 | Needs documentation: 0 Easy pickings: 0 | Patch needs improvement: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by anonymous): Replying to [ticket:18324 anonymous]: > {{{ > 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='') > sequence = models.IntegerField(default=0) > class Meta: > db_table = 'some_model' > ordering = ['field1', 'sequence'] # Caused by this line > }}} > > {{{ > # > # SomeModel.objects.values('field1').distinct() # sql: SELECT DISTINCT "some_model"."field1", "some_model"."sequence" FROM "some_model" ORDER BY "some_model"."field1" ASC, "some_model"."sequence" ASC > # > > }}} -- Ticket URL: <https://code.djangoproject.com/ticket/18324#comment:3> Django <https://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.