#2076: order_by with related table does not work
---------------------------+------------------------------------------------
Reporter: mtredinnick | Owner: nobody
Status: new | Component: Database wrapper
Version: SVN | Resolution:
Keywords: qs-rf | Stage: Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 1
---------------------------+------------------------------------------------
Comment (by [EMAIL PROTECTED]):
FWIW I just tripped across what I think is this bug also. Briefly, I have
a model a bit like this...
{{{
class DayLocationHit(models.Model):
location=models.ForeignKey(Location)
date=models.DateField()
hits=models.IntegerField(default=0)
class Admin:
pass
class Meta:
ordering=('location','date')
}}}
And can't use the foreign key as the "major" sort criteria in the admin
interface. The exception is "missing FROM-clause entry for table
"keywordsites_location" LINE 1: ...ques" FROM
"keywordsites_daylocationhit" ORDER BY "keywordsi... ^" on Postgres.
--
Ticket URL: <http://code.djangoproject.com/ticket/2076#comment:41>
Django Code <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 [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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---