Open GoogleCodeExporter opened 8 years ago
Are you talking about model ordering or object ordering? Dumpscript already
orders
the models to avoid dependency problems as much as possible using the function
queue_models().
Object-level ordering is also done if I remember correctly. If a ForeignKey
hasn't
been processed yet, a DoLater exception is raised and the object is thrown back
to
the end of the queue to be processed later. If it detects circular references,
it
gives up and sets the foreign key to null, trying again afterwards.
Can you give me an example of something that trips it up? I'm thinking about
using
placeholders soon, to deal with circular dependencies, but that might cause
other
problems, especially if the placeholder has an effect on custom code.
Original comment by e.willha...@gmail.com
on 16 Nov 2008 at 2:57
By the way, sorry for the delay, I missed this ticket and it never got starred.
Original comment by e.willha...@gmail.com
on 16 Nov 2008 at 2:57
Ok, looking at the code it looks like DoLater is caught at the field level,
meaning
that field is simply skipped.
I think it would be nicer if DoLater is passed on, and the entire object is
skipped
to be processed later. I'll look into this over the next couple of weeks.
Original comment by e.willha...@gmail.com
on 16 Nov 2008 at 3:13
Original comment by e.willha...@gmail.com
on 15 Mar 2009 at 10:32
Original issue reported on code.google.com by
philipp....@gmail.com
on 16 Sep 2008 at 8:48