Re: order_by does not support joins

2006-11-05 Thread serbaut
> Judging from the comments on that ticket, I think it's a slightly > different issue; #2210 deals with fetching the Options class of the > wrong model when the related field has 'db_column' set; in that case, > it appears Django is generating the correct table list for the query, > but not the co

Re: Re: order_by does not support joins

2006-11-05 Thread James Bennett
On 11/5/06, serbaut <[EMAIL PROTECTED]> wrote: > I submitted a patch for this a while back: > http://code.djangoproject.com/attachment/ticket/2210/order_by_related.diff Judging from the comments on that ticket, I think it's a slightly different issue; #2210 deals with fetching the Options class o

Re: order_by does not support joins

2006-11-05 Thread serbaut
I submitted a patch for this a while back: http://code.djangoproject.com/attachment/ticket/2210/order_by_related.diff --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this grou

Re: order_by does not support joins

2006-11-04 Thread Adrian Holovaty
On 11/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The order_by method does not support joined tables: > .order_by('author__username') Hi dcramer, This is slightly inelegant, but you can specify the SQL table name in order_by(): order_by('myapp_authors.username') Adrian -- Adrian

Re: order_by does not support joins

2006-11-04 Thread James Bennett
On 11/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > The order_by method does not support joined tables: > .order_by('author__username') Yes, this is ticket #2076: http://code.djangoproject.com/ticket/2076 Until someone figures it out, a workaround would be to do .extra(tables=['auth_user