Re: Two fields foreign key of same table

2008-02-13 Thread Sairam Krishnamurthy
Thanks Pete. On Feb 13, 2008 4:07 PM, Pete Crosier <[EMAIL PROTECTED]> wrote: > > Read the message a little closer, it tells you what to do.. each > ForeignKey field needs a related_name to distinguish it from the > other. > > On Feb 13, 10:33 am, "Sairam Krishnamurthy" <[EMAIL PROTECTED]> >

Re: Two fields foreign key of same table

2008-02-13 Thread Pete Crosier
Read the message a little closer, it tells you what to do.. each ForeignKey field needs a related_name to distinguish it from the other. On Feb 13, 10:33 am, "Sairam Krishnamurthy" <[EMAIL PROTECTED]> wrote: > Hi, > > I have a table structure like this. > > class

Two fields foreign key of same table

2008-02-13 Thread Sairam Krishnamurthy
Hi, I have a table structure like this. class Componentdependencies(models.Model): componentVersionID = models.ForeignKey(Componentversions) depComponentVersionID = models.ForeignKey(Componentversions) useFlagID = models.ForeignKey(Useflags, db_column='useFlagID') class Meta: