Hi all,
I'm trying to dump a database fixture, and load it again to run tests. When I run `python manage.py test`, I get: > IntegrityError: Problem installing fixtures: insert or update on table > "publisher_journaldupextid" violates foreign key constraint > "publisher_journaldup_journal_id_67a6a414_fk_publisher" > DETAIL: Key (journal_id)=(153) is not present in table > "publisher_journal". On further inspection this is because django.core.serializers.sort_dependencies, which I'm using to create the fixture, is sorting models in the wrong order. Looking at the source of sort_dependencies, the only constraints on the ordering of models relate to natural keys. I'm not using natural keys, but my database has foreign key constraints so order of loading is still important. Am I missing something about how to save and load models without violating FK constraints? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/aa34a69f-e20c-4d4f-92a0-e44429e62c0c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.