Re: Merging results from two tables

2012-07-23 Thread Madhu
Hi! How should i get the details from B and some content of A using that foreign key? Thanks Madhu On Saturday, January 31, 2009 10:37:58 PM UTC+5:30, Daniel Roseman wrote: > > On Jan 31, 12:27 pm, Markus wrote: > > Hi > > > > just starting to use Django, am stuck with the following problem:

Re: Merging results from two tables

2009-02-01 Thread Markus
Thanks, that did the trick!! On Jan 31, 6:07 pm, Daniel Roseman wrote: > On Jan 31, 12:27 pm, Markus wrote: > > > > > Hi > > > just starting to use Django, am stuck with the following problem: > > > Given > > > class A(models.Model): > >     ...some fields... > > > class B(models.Model): > >  

Re: Merging results from two tables

2009-01-31 Thread Daniel Roseman
On Jan 31, 12:27 pm, Markus wrote: > Hi > > just starting to use Django, am stuck with the following problem: > > Given > > class A(models.Model): >     ...some fields... > > class B(models.Model): >    A = models.ForeignKey(A) >    some fields... > > I would like to generate a Queryset that

Merging results from two tables

2009-01-31 Thread Markus
Hi just starting to use Django, am stuck with the following problem: Given class A(models.Model): ...some fields... class B(models.Model): A = models.ForeignKey(A) some fields... I would like to generate a Queryset that returns values from both tables, ie in SQL SELECT A.field1