id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 9553 Save of ForeignKeys's model doesn't cause update of _id field Oldřich Jedlička nobody "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 }}} " closed Database layer (models, ORM) 1.0 invalid Unreviewed 1 0 0 0 0 0