#8507: dumpdata/loaddata can't handle two of the same contenttypes having different IDs in different databases -------------------------------------------+-------------------------------- Reporter: Erik Allik <[EMAIL PROTECTED]> | Owner: nobody Status: new | Milestone: post-1.0 Component: Serialization | Version: SVN Keywords: dumpdata loaddata | Stage: Unreviewed Has_patch: 0 | -------------------------------------------+-------------------------------- Currently loaddata and dumpdata are pretty dumb in that they are not able to identify when two objects/rows that have different database ID's are actually one and the same object (or equivalent).
For example, when dumping a dataset that has fkeys to the django_content_type table and then loading that data to another database which happens to have exactly the same content types installed but some of which have different database ID values, the outcome is an IntegrityError (or corrupted data). I think users should actually be able to do that without having to concern themselves with low level details such as database IDs. As a potential solution, it could be possible define how two model objects compare two be able to match equivalent objects with different ID's. As a side note, this could actually evolve to something that would also allow for callbacks to determine whether to overwrite a database object with an fixture object or not (for example, based on modification dates). This would simplify synchronizing databases and would not be difficult to implement either. -- Ticket URL: <http://code.djangoproject.com/ticket/8507> Django Code <http://code.djangoproject.com/> The web framework for perfectionists with deadlines --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
