Re: order_by with foreign keys

2007-09-10 Thread Michael Radziej
On Mon, Sep 10, [EMAIL PROTECTED] wrote: > > that helps, thanks very much... > > i got a bit confused by all the tickets concerning this issue. also > the documentation doesn't mention any bugs, well bad luck ;) I didn't mean to blame this on you, it's not easy to find your way through the tic

Re: order_by with foreign keys

2007-09-10 Thread John Lenton
On 9/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > that helps, thanks very much... > > i got a bit confused by all the tickets concerning this issue. also > the documentation doesn't mention any bugs, well bad luck ;) fortunately you can add a comment to the documentation, mentioning th

Re: order_by with foreign keys

2007-09-10 Thread [EMAIL PROTECTED]
that helps, thanks very much... i got a bit confused by all the tickets concerning this issue. also the documentation doesn't mention any bugs, well bad luck ;) On 10 Sep., 17:53, Michael Radziej <[EMAIL PROTECTED]> wrote: > On Mon, Sep 10, [EMAIL PROTECTED] wrote: > > > hi guys, > > i noticed t

Re: order_by with foreign keys

2007-09-10 Thread Michael Radziej
On Mon, Sep 10, [EMAIL PROTECTED] wrote: > > 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_rela

order_by with foreign keys

2007-09-10 Thread [EMAIL PROTECTED]
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 fo

Re: order_by with Foreign Keys

2007-01-15 Thread [EMAIL PROTECTED]
Hmm... the site hangs forever in Apache 2.x when I try this...I've emailed the branch developer to ask if there is a known issue w/ select_related... hopefully I can get it worked out ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: order_by with Foreign Keys

2007-01-15 Thread [EMAIL PROTECTED]
I'll give this a shot...I'm actually using the multi-db branch..but hopefully this will work here ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django

Re: order_by with Foreign Keys

2007-01-12 Thread DavidA
I found this patch which fixes it. I've been using it for a while now: http://code.djangoproject.com/ticket/2210 Honza Král wrote: > this works fine, but if you forget the select_related() it will result > in a cross join which is probably the last thing you want from your > database... > > I was

Re: order_by with Foreign Keys

2007-01-12 Thread Honza Král
this works fine, but if you forget the select_related() it will result in a cross join which is probably the last thing you want from your database... I was bitten by this when I specified this sort of ordering in the model... On 1/13/07, gordyt <[EMAIL PROTECTED]> wrote: > > Hi Carole, > > There

Re: order_by with Foreign Keys

2007-01-12 Thread gordyt
Hi Carole, There is a workaround for this problem. I am using the latest subversion build of django, so I don't know if it works with the last official build or not. Here is an example: ProductVersion.objects.select_related().order_by("kindledb_product.name","version_number") Here are the mod

Re: order_by with Foreign Keys

2007-01-12 Thread Russell Keith-Magee
On 1/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I've seen a few posts that this was a bug where you cannot specify > order_by with a column from a foreign key ... > order_by(foreignkeytable__foreignkeycolumn) because it says table not > found. > > Does anyone know if there are plans t

order_by with Foreign Keys

2007-01-11 Thread [EMAIL PROTECTED]
I've seen a few posts that this was a bug where you cannot specify order_by with a column from a foreign key ... order_by(foreignkeytable__foreignkeycolumn) because it says table not found. Does anyone know if there are plans to fix this...or if there is a work around? I have several resultsets