#9553: Save of ForeignKeys's model doesn't cause update of _id field
------------------------------------------+---------------------------------
Reporter: oldium | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.0
Keywords: | Stage: Unreviewed
Has_patch: 0 |
------------------------------------------+---------------------------------
For two models
{{{
class Inner(models.Model):
field = models.CharField(max_length=10)
class Outer(models.Model):
inner = models.ForeignKey(Inner)
other_field = models.CharField(max_length=15)
}}}
It is not possible to write
{{{
inner = Inner(field="test")
outer = Outer(inner=inner, other_field="other test")
inner.save()
outer.save()
}}}
It ends-up with
{{{
IntegrityError: null value in column "inner_id" violates not-null
constraint
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/9553>
Django <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
-~----------~----~----~----~------~----~------~--~---