Re: select_related
Hi Daniel
Re: (2.)
company.purchase_set.all returns nothing in my template.
This is my select_related line:
a = Company.objects.select_related().get(pk=pk)
Regarding your reply (1.) because there are no FK's in the company
table I had assumed that Django must be using reverse relations to
access Person. Is that not the case?
I am also trying to view the SQL that django is running with my
select_related query following this:
https://docs.djangoproject.com/en/1.3/faq/models/#faq-databases-and-models
To try and see if the purchase class is even being queried but when I
try connection.queries in the Django shell no queries return.
--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home