#36075: Field.primary_key documentation should details its interaction with
CompositePrimaryKey
-------------------------------------+-------------------------------------
Reporter: Simon Charette | Type:
| Cleanup/optimization
Status: new | Component:
| Documentation
Version: dev | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
A particular focus should be put on the fact that the flag will and should
only be set to `True` if the field is the single member of the primary
key. When a composite primary is defined on the model this flag will be
`False` for all the fields defined on the model and `_meta.pk_fields`
(which should be documented) should be used instead to build composite
primary key ready third-party application.
In other words, it should be made clear that code that relies on
`Field.primary_key` is not composite field ready and that
`_meta.pk_fields` should be used instead.
--
Ticket URL: <https://code.djangoproject.com/ticket/36075>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070194499e5546-5fe5a011-87ae-45fd-9fdc-d2c9808fe364-000000%40eu-central-1.amazonses.com.