I'm sorry if this have been discussed before. I have table A, which have foreign key foo to model B.
When I query B related set trough B.a_set.all(). When I iterate over b_instance.a_set.all() and access foo member, Django doesn't hesitate to make database query to retrieve B again and again. Sometimes I can override it setting foo = b_instance manually and then calling methods on foo, but that's not always possible. Using a_set.selected_related('foo') is overkill for a database too. Any comments? --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---