Hi all, I'm trying to figure out how to do this and can't seem to wrap my head around it today. I have currently have a piece of code like this:
x = [MyModel.objects.get(pk=pk) for pk in model_pk_list] I want to modify this such that ... * Everything is done with one call to the DB instead len (model_pk_list) calls * x is lazily-evaluated (e.g. like a QuerySet object) * The results come back in the same order as they are in model_pk_list Is this possible? Thanks in advance! -- Andrew --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---