hi guys,
i noticed there have been questions about this before, but none of
those threads was helpful.

i've got a simple db-request, the result should be ordered by a column
"thema" in a foreign key table "Thema":
Test.objects.select_related().order_by("my_app_thema.thema"):

this produces the following error:
Column my_app_thema.thema_id does not exist at character 1105

why is that? clearly i don't want django to look for the column
"thema_id", instead i want it to look for "thema", so where did i go
wrong?

the models for this:
class Test(models.Model):
    title = models.CharField(maxlength=120)
    thema = models.ForeignKey(Thema)

class Thema(models.Model):
    thema = models.CharField(maxlength=90)

any help would be greatly appreciated ;)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to