Hi, Using Django 1.1 I have the following filter p = DB.filter( value_in = values, name__in = names).select_related()
I am facing 2 issues in here. 1. Unexpected DB queries I did p = list(p) The total queries was 1 I then did p = list(p) for a in p: pass Now, the total queries is coming to be 2. I was under the impression that in both cases query count should be same because p is already loaded. 2. Select_related not working. Whenever I call p.value, it is again querying the DB. value is a foreign key to Values table which has a many-to-many relationship with another table. Is it because of that? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---