#26703: field automatically choosen as primary_key (primary_key=False do not
work)
-------------------------------------+-------------------------------------
Reporter: nbremond | Owner: nobody
Type: Bug | Status: closed
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution: duplicate
Keywords: multi-table | Triage Stage:
inheritance, primary_key, | Unreviewed
OneToOneField |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by charettes):
* status: new => closed
* resolution: => duplicate
Comment:
I'm fairly confident it is.
During the deprecation period you'll have to declare both
`OneToOneField`s:
{{{#!python
class A(Base):
base_ptr = models.OneToOneField(Base, parent_link=True,
primary_key=True)
other = models.OneToOneField(Base, null=True,
related_name='other_base')
}}}
Where the `base_ptr` field should be the named after the lower cased name
of the parent-linked base followed by the `'_ptr'` suffix.
--
Ticket URL: <https://code.djangoproject.com/ticket/26703#comment:2>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.6c11fb99e9d42a3a23eb51bfb39d5a83%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.