Django doesn’t support composite primary key as the ORM heavily relies on a
single attribute of a class(e.g: pk or id) field for its inference and
usage in the django applications. Owing to this reason composite primary
keys are not permitted in Django. But you may use unique_together
constraint on
Hi.
Django doesn't support composite keys.
pe 4. lokak. 2019 klo 14.47 narendra thapa
kirjoitti:
> as i was trying to make a composite key on students model . i wanna make
> composite key of field enrolled year and roll no but django is not
> accepting a two primary key in same model
>
> --
>
as i was trying to make a composite key on students model . i wanna make
composite key of field enrolled year and roll no but django is not
accepting a two primary key in same model
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscrib
3 matches
Mail list logo