#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
-------------------------------------+-------------------------------------

Comment (by charettes):

 @timgraham, It makes me wonder if we should adjust
 
[https://github.com/django/django/blob/44c7e5d3740edf796591ea3a89b0ff085534f225/django/db/models/options.py#L249-L252
 the deprecation warning] raised on implicit non-parent_link
 `OneToOneField` promotion to mention either to add `parent_link=True` or
 how to declare the usual implicit `parent_link` as the actions to take in
 order to have both fields available is non-trivial from the deprecation
 message.

 For example, in the reported case the message would be:

 `Implicit parent link is deprecated, either add parent_link=True to
 A.other or declare base_ptr = models.OneToOneField(Base, parent_link=True,
 primary_key=True) before it during the deprecation period`

--
Ticket URL: <https://code.djangoproject.com/ticket/26703#comment:3>
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.f709670c9f18822e7cb70c7fc39b93ff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to