#34634: Creating objects with nested MTI crashes.
-------------------------------------+-------------------------------------
     Reporter:  Mariusz Felisiak     |                    Owner:  Akash
                                     |  Kumar Sen
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  4.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 > The values are empty strings in the query 1, So I don't think this gives
 the expected results. The name and address should have their respective
 values instead of empty strings.

 Right I missed that. So no more crash but wrong behaviour.

 > Along with the field place_ptr , the following fields, i.e all the
 fields of Place model seems to be <django.db.models.fields.AutoField: id>,
 <django.db.models.fields.CharField: name>,
 <django.db.models.fields.CharField: address> present twice without any
 conflicts or errors. So I think it would make sense if we disallow the
 case-4 according to comment:8

 I'm not sure I understand why this is the case. When
 `ItalianRestaurantManyParents(ItalianRestaurant, Place)` is defined it
 requires creating two parent links, `italianrestaurant_ptr ->
 ItalianRestaurant` and `place_ptr -> Place`. The only attribute conflict
 should be between `ItalianRestaurantManyParents.place_ptr` and
 `Restaurant.place_ptr` in this case, all the other fields are only defined
 once on the `Place` model and nowhere else.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34634#comment:13>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/01070188ba52b86e-b0e58934-4830-4c46-ad17-ced73fb9917a-000000%40eu-central-1.amazonses.com.

Reply via email to