#28972: `RelatedObjectDoesNotExist` during `loaddata` of models with multi-table
inheritance
-------------------------------------+-------------------------------------
     Reporter:  Kal Sze              |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core                 |                  Version:  2.0
  (Serialization)                    |
     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 Kal Sze):

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


Comment:

 Actually there is still a bit of a problem.

 Even though serialization and deserialization "work", I think the result
 still misses the *point* of the natural key.

 If I look at the fixtures being dumped out, the parent model is still
 referred to by pk:

 ```
 [...
 {
         "model": "licenses.baselicense",
         "pk": 1,
         "fields": {
                 "user": ["kal"]
         }
 },
 {
         "model": "licenses.adobephotoshoplicense",
         "fields": {
                 "baselicense_ptr": 1,
                 "license_key": "12345"
         }
 }]
 ```

 Whereas I expect it to be just something like:
 ```
 {
         "model": "licenses.adobephotoshoplicense",
         "fields": {
                 "user": ["kal"],
                 "license_key": "12345"
         }
 }
 ```

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

Reply via email to