Re: Executing queries across multiple models

2010-10-13 Thread nathan
Thanks. Worked perfectly. I never thought to do: for person in Person.objects.all(): -- Nathan On Oct 13, 4:37 am, Kenneth Gonsalves wrote: > On Tue, 2010-10-12 at 20:39 -0700, nathan wrote: > > I have three Models: > > > Person: > >     name = models.CharField(max_length=20) > > > Item: > >  

Re: Executing queries across multiple models

2010-10-13 Thread Kenneth Gonsalves
On Tue, 2010-10-12 at 20:39 -0700, nathan wrote: > I have three Models: > > Person: > name = models.CharField(max_length=20) > > Item: > name = models.CharField(max_length=20) > > Collection: > owner = models.ForeignKey(Person) > items = models.ManyToManyField(Item) > > Where ea

Executing queries across multiple models

2010-10-13 Thread nathan
I have three Models: Person: name = models.CharField(max_length=20) Item: name = models.CharField(max_length=20) Collection: owner = models.ForeignKey(Person) items = models.ManyToManyField(Item) Where each Person has a Collection consisting of several Items. What I want to do