Re: Foreign Key + Primary key

2012-12-28 Thread vicherot
Well, i was looking for some help to this particulary problem... what Sandy want to do its callit "Generalization". Its use full for Generalize o Specialize models... look http://packages.python.org/djeneralize/terminology.html for a example... in Django you must to use "inheritance" of

Re: Foreign Key + Primary key

2012-02-08 Thread akaariai
On Feb 8, 7:01 pm, Sandeep kaur wrote: > Is there any way of having a field in table, declared both as foreign > key as well as primary key? > I want something like this in models: >      publisher = models.ForeignKey(Publisher,primary_key=True) If the above doesn't work,

Re: Foreign Key + Primary key

2012-02-08 Thread yati sagade
Even if there was provision for that(I don't know), it really wouldn't make sense. A parent relation tuple can be referenced by multiple child relation tuples - thereby breaking the uniqueness constraint that comes with a primary key. On Wed, Feb 8, 2012 at 10:31 PM, Sandeep kaur

Re: Foreign Key + Primary key

2012-02-08 Thread Joel Goldstick
On Wed, Feb 8, 2012 at 12:01 PM, Sandeep kaur wrote: > Is there any way of having a field in table, declared both as foreign > key as well as primary key? > I want something like this in models: >     publisher = models.ForeignKey(Publisher,primary_key=True) > > -- >

Foreign Key + Primary key

2012-02-08 Thread Sandeep kaur
Is there any way of having a field in table, declared both as foreign key as well as primary key? I want something like this in models: publisher = models.ForeignKey(Publisher,primary_key=True) -- Sandeep Kaur E-Mail: mkaurkha...@gmail.com Blog: sandymadaan.wordpress.com -- You received