Hi,

Okay, I've been having trouble getting this to work, though it _looks_ easy. My 
results have proven otherwise (django 0.96, by the way.. I'm modifying an 
esisting system, not creating a new one so don't have an upgrade option right 
now).

For simplicity, heres a table overview

Table_1
    some_field
    other_field
    fk_table_2

Table_2
    name
    ...


The selection looks like this:

    recs    = Table_1.objects.filter(some_field='xyz')
    
then, I want to sort by Table_2.name so in theory, it should be:
    
    recs    = recs.order_by('fk_table_2.name')
    
... or to approximate the online docs example:
    
    recs    = recs.order_by('fk_table_2.name','other_field')

This results in:
     ERROR:  missing FROM-clause entry for table

Any suggestions would be greatly appreciated,

Thanks,

Scott

--~--~---------~--~----~------------~-------~--~----~
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