#8463: force_insert doesn't work with inherited models
----------------------------+-----------------------------------------------
 Reporter:  nidi            |       Owner:  nobody    
   Status:  new             |   Milestone:  1.0       
Component:  Core framework  |     Version:  SVN       
 Keywords:                  |       Stage:  Unreviewed
Has_patch:  0               |  
----------------------------+-----------------------------------------------
 The following testcase describes the problem best:

 Model:
 {{{
 from django.db import models

 class Parent(models.Model):
     something = models.SlugField()

 class Daughter(Parent):
     pass
 }}}

 Interactive session:

 {{{
 In [1]: from appname.models import Daughter
 In [2]: d = Daughter(something='algo')
 In [3]: d.save()
 In [4]: d.something='otra'
 In [5]: d.save(force_insert=True)
 }}}
 results in
 {{{
 IntegrityError: duplicate key value violates unique constraint
 "appname_daughter_pkey"
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8463>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to