I am trying to do manage.py loaddata myfixture.json to deliberately overwrite multiple records in my database. However, this gives me an error:
IntegrityError: Problem installing fixture 'myfixture.json': Could not load myapp.Person(pk=1): (1062, "Duplicate entry 'Bob' for key 'name'")
I thought the behavior of loaddata was to overwrite records if the primary key matches an existing record? Am I mistaken, or was this changed in Django 1.5? How do I rewrite it?
source share