﻿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
26291	loaddata cannot deserialize fixtures with forward references and natural foreign keys	Peter Inglesby	nobody	"The following fixture cannot be deserialized, unless an Author object with name ""John Steinbeck"" already exists.  This is because when Django tries to deserialize the first object, it tries to load an Author with name ""John Steinbeck"", which fails.


{{{
[
  {
    ""model"": ""app.book"",
    ""fields"": {
      ""title"": ""East Of Eden"",
      ""author"": [""John Steinbeck""]
    }
  },
  {
    ""model"": ""app.author"",
    ""fields"": {
      ""name"": ""John Steinbeck"",
      ""date_of_birth"": ""1902-02-27""
    }
  }
]
}}}

This problem is avoidable with careful ordering of fixture loading, but is still a problem with fixtures that have circular references.

I have a proposed fix: see PR 6221"	Uncategorized	new	Core (Serialization)	1.9	Normal				Unreviewed	1	0	0	0	0	0
