I need to share an object (which has very complex relationships with other objects) between 2 or 3 completely separate sql databases. Ideally I'd like to have a script which is scripts/dump_object class_name object_id > file and script/load_object file.
I've tried yaml_db (which dumps the whole db - which is not optimal) and it dies with foreign key constraint errors. I've tried to script this up myself by using reflections to traverse the model relationships but have gotten bogged down in trying to figure out in what order to create the objects when loading.
Since it appears that a programatic solution to this is possible, I'm shocked that I can't either find a snippet or a download that already does it. Anybody run across this already?