I need to create some fixtures for django test. Does anyone know of a shortcut that lets me get x number of rows from every table in database and serialize it?
Background:
I have Multiple tables with 10's of millions of entries. I have tried to use the ./manage.py dumpdata
, but in addition to taking too long there is no way fixture should be that large.
Each table has multiple foreign keys.
The Problem:
The code I am trying to test frequently calls select_related()
Meaning I need all the foreign key relationships filled in.
Does anyone know of any tools that can help me follow foreign relationships for serializing DB data??? Any suggestions would be greatly appreciated. Thank you for your time.