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
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,
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
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)
>
> --
>
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
5 matches
Mail list logo