#30382: force_insert flag is not passed when saving parents on inherited models.
-------------------------------------+-------------------------------------
     Reporter:  Phill Tornroth       |                    Owner:  Akash
                                     |  Kumar Sen
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  dev
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Akash Kumar Sen):

 Hi Natalia,
 Try replacing your {{{models.py}}} with the following and it would
 probably work. There seems to be another bug that goes beyond reported
 here. When the primary key field is the only field in the model it
 generates an extra select statement. Created another ticket #34549 for
 that. Check for better explanation.

 {{{
 class ParentModel(models.Model):
     id = models.BigIntegerField(primary_key=True)
     name = models.CharField(max_length=10)


 class ChildModel(ParentModel):
     pass
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30382#comment:10>
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/01070187fe2b7ce0-a8f352bd-4442-4f08-bf4b-012ff9b3c72b-000000%40eu-central-1.amazonses.com.

Reply via email to