Re: select_related() and primary-keys

2010-04-18 Thread Daishy
Hi, Thanks for the answer. My problem was, the id/pks werent populated, they were just None. But it seems that problem is related to some other problem in my models, which i have to fix first. Maybe that will fix my problems :) On 18 Apr., 19:32, Daniel Roseman wrote: > On Apr 18, 5:32 pm, Daishy

Re: select_related() and primary-keys

2010-04-18 Thread Daniel Roseman
On Apr 18, 5:32 pm, Daishy wrote: > Hi together, > > I'm trying to use select_related in a query, but it seems i'm doing > something wrong. I have googled, but not really found anything (Maybee > used the wrong keywords :/) > > I've got a model that is related to another model, roughly like that:

select_related() and primary-keys

2010-04-18 Thread Daishy
Hi together, I'm trying to use select_related in a query, but it seems i'm doing something wrong. I have googled, but not really found anything (Maybee used the wrong keywords :/) I've got a model that is related to another model, roughly like that: class A(models.Model): a = models.CharField(