Apologies for not using DPaste. I thought the snippets were small
enough. And I thought my question was cleared than it turned out to
be!

To clarify (where someobject_set is a related-object queryset):

someobject_set.all().query.as_sql()
someobject_set.select_related().query.as_sql()

Both show identical SQL is being generated - which indicates that
select_related() isn't following any relationships.

One of the fields is a foreign key to another so I would have expect
the second query to result in a join.

(incidentally - the problem I am trying to solve is to sort by a field
that is in a related table but that question can wait until I can
understand the reason for the above issue)
--~--~---------~--~----~------------~-------~--~----~
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