Ah, it was user-error.  I was bulk-inserting some data with predefined foreign key ids, but I forgot to create the table that those foreign keys reference, and I didn't set "null=True" in the model.  So, the select_related was joining a table that had no records -- thus returning an empty list when I queried for them.
I should've known it was MY dumb mistake rather than Django's!

Dave

On 4/10/06, Adrian Holovaty <[EMAIL PROTECTED] > wrote:

On 4/10/06, Dave St.Germain < [EMAIL PROTECTED]> wrote:
> ...Or am I doing something wrong?
> In django-trunk, select_related seems to work, but in magic-removal, I get
> an empty list.  It looks like the QuerySet isn't generating the joins for
> related objects correctly.  I'm still digging into this one, but is this a
> known issue?

I'm not aware of any problems with select_related...Could you paste
the exact code you're using?

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com





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

Reply via email to