Re: [Django] #30531: Exception when creating an inherited model object with existing base

2019-05-30 Thread Django
#30531: Exception when creating an inherited model object with existing base
-+-
 Reporter:  Victor Porton|Owner:  nobody
 Type:  Bug  |   Status:  closed
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:  invalid
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Simon Charette):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 If you want to use `Derived.base` as your inheritance parent link you have
 to
 
[https://docs.djangoproject.com/en/2.2/ref/models/fields/#django.db.models.OneToOneField.parent_link
 mark it accordingly].

 Right now your table `Derived` model has two o2o fields pointing at
 `Base`; the explicit one you defined and the implicit parent link
 `base_ptr`. When you try to create your `Derived` object in `test_bug`
 it's the `base_ptr.v` field value that is missing.

 Adding `parent_link=True` to your `Derived.base` field should address your
 issue.

 Closing per TicketClosingReasons/UseSupportChannels.

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.52cd6760464e84926a1c4f119ccd4362%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #30531: Exception when creating an inherited model object with existing base

2019-05-30 Thread Django
#30531: Exception when creating an inherited model object with existing base
-+-
 Reporter:  Victor Porton|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  2.2
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:
 |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Victor Porton):

 * Attachment "django-create-inherited-bug.tar.gz" added.

 Source which causes the bug

-- 
Ticket URL: 
Django 
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.028e6ebb6ff27c84100546ae95a9206e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.